1. Packages
  2. Vra Provider
  3. API Docs
  4. getCatalogItem
vra 0.12.0 published on Monday, Apr 14, 2025 by vmware

vra.getCatalogItem

Explore with Pulumi AI

vra logo
vra 0.12.0 published on Monday, Apr 14, 2025 by vmware

    This data source provides information about a catalog item in vRA.

    Example Usage

    S

    This is an example of how to get a vRA catalog item by its name.

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = vra.getCatalogItem({
        name: _var.catalog_item_name,
        expandVersions: true,
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.get_catalog_item(name=var["catalog_item_name"],
        expand_versions=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.GetCatalogItem(ctx, &vra.GetCatalogItemArgs{
    			Name:           pulumi.StringRef(_var.Catalog_item_name),
    			ExpandVersions: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Vra.GetCatalogItem.Invoke(new()
        {
            Name = @var.Catalog_item_name,
            ExpandVersions = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.VraFunctions;
    import com.pulumi.vra.inputs.GetCatalogItemArgs;
    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 this = VraFunctions.getCatalogItem(GetCatalogItemArgs.builder()
                .name(var_.catalog_item_name())
                .expandVersions(true)
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: vra:getCatalogItem
          arguments:
            name: ${var.catalog_item_name}
            expandVersions: true
    

    This is an example of how to get a vRA catalog item by its id.

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = vra.getCatalogItem({
        id: _var.catalog_item_id,
        expandVersions: true,
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.get_catalog_item(id=var["catalog_item_id"],
        expand_versions=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.GetCatalogItem(ctx, &vra.GetCatalogItemArgs{
    			Id:             pulumi.StringRef(_var.Catalog_item_id),
    			ExpandVersions: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Vra.GetCatalogItem.Invoke(new()
        {
            Id = @var.Catalog_item_id,
            ExpandVersions = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.VraFunctions;
    import com.pulumi.vra.inputs.GetCatalogItemArgs;
    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 this = VraFunctions.getCatalogItem(GetCatalogItemArgs.builder()
                .id(var_.catalog_item_id())
                .expandVersions(true)
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: vra:getCatalogItem
          arguments:
            id: ${var.catalog_item_id}
            expandVersions: true
    

    Using getCatalogItem

    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 getCatalogItem(args: GetCatalogItemArgs, opts?: InvokeOptions): Promise<GetCatalogItemResult>
    function getCatalogItemOutput(args: GetCatalogItemOutputArgs, opts?: InvokeOptions): Output<GetCatalogItemResult>
    def get_catalog_item(expand_projects: Optional[bool] = None,
                         expand_versions: Optional[bool] = None,
                         id: Optional[str] = None,
                         name: Optional[str] = None,
                         project_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCatalogItemResult
    def get_catalog_item_output(expand_projects: Optional[pulumi.Input[bool]] = None,
                         expand_versions: Optional[pulumi.Input[bool]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         project_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCatalogItemResult]
    func GetCatalogItem(ctx *Context, args *GetCatalogItemArgs, opts ...InvokeOption) (*GetCatalogItemResult, error)
    func GetCatalogItemOutput(ctx *Context, args *GetCatalogItemOutputArgs, opts ...InvokeOption) GetCatalogItemResultOutput

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

    public static class GetCatalogItem 
    {
        public static Task<GetCatalogItemResult> InvokeAsync(GetCatalogItemArgs args, InvokeOptions? opts = null)
        public static Output<GetCatalogItemResult> Invoke(GetCatalogItemInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCatalogItemResult> getCatalogItem(GetCatalogItemArgs args, InvokeOptions options)
    public static Output<GetCatalogItemResult> getCatalogItem(GetCatalogItemArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vra:index/getCatalogItem:getCatalogItem
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ExpandProjects bool
    Flag to indicate whether to expand detailed project data for the catalog item.
    ExpandVersions bool
    Flag to indicate whether to expand detailed versions of the catalog item.
    Id string
    The id of catalog item. One of id or name must be provided.
    Name string
    Name of the catalog item. One of id or name must be provided.
    ProjectId string
    The id of the project to narrow the search while looking for catalog items.
    ExpandProjects bool
    Flag to indicate whether to expand detailed project data for the catalog item.
    ExpandVersions bool
    Flag to indicate whether to expand detailed versions of the catalog item.
    Id string
    The id of catalog item. One of id or name must be provided.
    Name string
    Name of the catalog item. One of id or name must be provided.
    ProjectId string
    The id of the project to narrow the search while looking for catalog items.
    expandProjects Boolean
    Flag to indicate whether to expand detailed project data for the catalog item.
    expandVersions Boolean
    Flag to indicate whether to expand detailed versions of the catalog item.
    id String
    The id of catalog item. One of id or name must be provided.
    name String
    Name of the catalog item. One of id or name must be provided.
    projectId String
    The id of the project to narrow the search while looking for catalog items.
    expandProjects boolean
    Flag to indicate whether to expand detailed project data for the catalog item.
    expandVersions boolean
    Flag to indicate whether to expand detailed versions of the catalog item.
    id string
    The id of catalog item. One of id or name must be provided.
    name string
    Name of the catalog item. One of id or name must be provided.
    projectId string
    The id of the project to narrow the search while looking for catalog items.
    expand_projects bool
    Flag to indicate whether to expand detailed project data for the catalog item.
    expand_versions bool
    Flag to indicate whether to expand detailed versions of the catalog item.
    id str
    The id of catalog item. One of id or name must be provided.
    name str
    Name of the catalog item. One of id or name must be provided.
    project_id str
    The id of the project to narrow the search while looking for catalog items.
    expandProjects Boolean
    Flag to indicate whether to expand detailed project data for the catalog item.
    expandVersions Boolean
    Flag to indicate whether to expand detailed versions of the catalog item.
    id String
    The id of catalog item. One of id or name must be provided.
    name String
    Name of the catalog item. One of id or name must be provided.
    projectId String
    The id of the project to narrow the search while looking for catalog items.

    getCatalogItem Result

    The following output properties are available:

    CreatedAt string
    Date-time when catalog item version was created at.
    CreatedBy string
    The user the entity was created by.
    Description string
    A human-friendly description.
    FormId string
    Form ID.
    IconId string
    Icon ID.
    Id string
    Id of the catalog item version.
    LastUpdatedAt string
    Date-time when the entity was last updated.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    Name of the entity.
    ProjectIds List<string>
    List of associated project IDs that can be used for requesting this catalog item.
    Projects List<GetCatalogItemProject>
    List of associated projects that can be used for requesting this catalog item.
    Schema string
    Json schema describing request parameters, a simplified version of http://json-schema.org/latest/json-schema-validation.html#rfc.section.5
    SourceId string
    LibraryItem source ID.
    SourceName string
    LibraryItem source name.
    Types List<GetCatalogItemType>
    Versions List<GetCatalogItemVersion>
    Catalog item versions.
    ExpandProjects bool
    ExpandVersions bool
    ProjectId string
    CreatedAt string
    Date-time when catalog item version was created at.
    CreatedBy string
    The user the entity was created by.
    Description string
    A human-friendly description.
    FormId string
    Form ID.
    IconId string
    Icon ID.
    Id string
    Id of the catalog item version.
    LastUpdatedAt string
    Date-time when the entity was last updated.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    Name of the entity.
    ProjectIds []string
    List of associated project IDs that can be used for requesting this catalog item.
    Projects []GetCatalogItemProject
    List of associated projects that can be used for requesting this catalog item.
    Schema string
    Json schema describing request parameters, a simplified version of http://json-schema.org/latest/json-schema-validation.html#rfc.section.5
    SourceId string
    LibraryItem source ID.
    SourceName string
    LibraryItem source name.
    Types []GetCatalogItemType
    Versions []GetCatalogItemVersion
    Catalog item versions.
    ExpandProjects bool
    ExpandVersions bool
    ProjectId string
    createdAt String
    Date-time when catalog item version was created at.
    createdBy String
    The user the entity was created by.
    description String
    A human-friendly description.
    formId String
    Form ID.
    iconId String
    Icon ID.
    id String
    Id of the catalog item version.
    lastUpdatedAt String
    Date-time when the entity was last updated.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    Name of the entity.
    projectIds List<String>
    List of associated project IDs that can be used for requesting this catalog item.
    projects List<GetCatalogItemProject>
    List of associated projects that can be used for requesting this catalog item.
    schema String
    Json schema describing request parameters, a simplified version of http://json-schema.org/latest/json-schema-validation.html#rfc.section.5
    sourceId String
    LibraryItem source ID.
    sourceName String
    LibraryItem source name.
    types List<GetCatalogItemType>
    versions List<GetCatalogItemVersion>
    Catalog item versions.
    expandProjects Boolean
    expandVersions Boolean
    projectId String
    createdAt string
    Date-time when catalog item version was created at.
    createdBy string
    The user the entity was created by.
    description string
    A human-friendly description.
    formId string
    Form ID.
    iconId string
    Icon ID.
    id string
    Id of the catalog item version.
    lastUpdatedAt string
    Date-time when the entity was last updated.
    lastUpdatedBy string
    The user the entity was last updated by.
    name string
    Name of the entity.
    projectIds string[]
    List of associated project IDs that can be used for requesting this catalog item.
    projects GetCatalogItemProject[]
    List of associated projects that can be used for requesting this catalog item.
    schema string
    Json schema describing request parameters, a simplified version of http://json-schema.org/latest/json-schema-validation.html#rfc.section.5
    sourceId string
    LibraryItem source ID.
    sourceName string
    LibraryItem source name.
    types GetCatalogItemType[]
    versions GetCatalogItemVersion[]
    Catalog item versions.
    expandProjects boolean
    expandVersions boolean
    projectId string
    created_at str
    Date-time when catalog item version was created at.
    created_by str
    The user the entity was created by.
    description str
    A human-friendly description.
    form_id str
    Form ID.
    icon_id str
    Icon ID.
    id str
    Id of the catalog item version.
    last_updated_at str
    Date-time when the entity was last updated.
    last_updated_by str
    The user the entity was last updated by.
    name str
    Name of the entity.
    project_ids Sequence[str]
    List of associated project IDs that can be used for requesting this catalog item.
    projects Sequence[GetCatalogItemProject]
    List of associated projects that can be used for requesting this catalog item.
    schema str
    Json schema describing request parameters, a simplified version of http://json-schema.org/latest/json-schema-validation.html#rfc.section.5
    source_id str
    LibraryItem source ID.
    source_name str
    LibraryItem source name.
    types Sequence[GetCatalogItemType]
    versions Sequence[GetCatalogItemVersion]
    Catalog item versions.
    expand_projects bool
    expand_versions bool
    project_id str
    createdAt String
    Date-time when catalog item version was created at.
    createdBy String
    The user the entity was created by.
    description String
    A human-friendly description.
    formId String
    Form ID.
    iconId String
    Icon ID.
    id String
    Id of the catalog item version.
    lastUpdatedAt String
    Date-time when the entity was last updated.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    Name of the entity.
    projectIds List<String>
    List of associated project IDs that can be used for requesting this catalog item.
    projects List<Property Map>
    List of associated projects that can be used for requesting this catalog item.
    schema String
    Json schema describing request parameters, a simplified version of http://json-schema.org/latest/json-schema-validation.html#rfc.section.5
    sourceId String
    LibraryItem source ID.
    sourceName String
    LibraryItem source name.
    types List<Property Map>
    versions List<Property Map>
    Catalog item versions.
    expandProjects Boolean
    expandVersions Boolean
    projectId String

    Supporting Types

    GetCatalogItemProject

    Description string
    A human-friendly description.
    Id string
    The id of catalog item. One of id or name must be provided.
    Name string
    Name of the catalog item. One of id or name must be provided.
    Version string
    Version of the entity, if applicable.
    Description string
    A human-friendly description.
    Id string
    The id of catalog item. One of id or name must be provided.
    Name string
    Name of the catalog item. One of id or name must be provided.
    Version string
    Version of the entity, if applicable.
    description String
    A human-friendly description.
    id String
    The id of catalog item. One of id or name must be provided.
    name String
    Name of the catalog item. One of id or name must be provided.
    version String
    Version of the entity, if applicable.
    description string
    A human-friendly description.
    id string
    The id of catalog item. One of id or name must be provided.
    name string
    Name of the catalog item. One of id or name must be provided.
    version string
    Version of the entity, if applicable.
    description str
    A human-friendly description.
    id str
    The id of catalog item. One of id or name must be provided.
    name str
    Name of the catalog item. One of id or name must be provided.
    version str
    Version of the entity, if applicable.
    description String
    A human-friendly description.
    id String
    The id of catalog item. One of id or name must be provided.
    name String
    Name of the catalog item. One of id or name must be provided.
    version String
    Version of the entity, if applicable.

    GetCatalogItemType

    Description string
    A human-friendly description.
    Id string
    The id of catalog item. One of id or name must be provided.
    Name string
    Name of the catalog item. One of id or name must be provided.
    Version string
    Version of the entity, if applicable.
    Description string
    A human-friendly description.
    Id string
    The id of catalog item. One of id or name must be provided.
    Name string
    Name of the catalog item. One of id or name must be provided.
    Version string
    Version of the entity, if applicable.
    description String
    A human-friendly description.
    id String
    The id of catalog item. One of id or name must be provided.
    name String
    Name of the catalog item. One of id or name must be provided.
    version String
    Version of the entity, if applicable.
    description string
    A human-friendly description.
    id string
    The id of catalog item. One of id or name must be provided.
    name string
    Name of the catalog item. One of id or name must be provided.
    version string
    Version of the entity, if applicable.
    description str
    A human-friendly description.
    id str
    The id of catalog item. One of id or name must be provided.
    name str
    Name of the catalog item. One of id or name must be provided.
    version str
    Version of the entity, if applicable.
    description String
    A human-friendly description.
    id String
    The id of catalog item. One of id or name must be provided.
    name String
    Name of the catalog item. One of id or name must be provided.
    version String
    Version of the entity, if applicable.

    GetCatalogItemVersion

    CreatedAt string
    Date-time when catalog item version was created at.
    Description string
    A human-friendly description.
    Id string
    The id of catalog item. One of id or name must be provided.
    CreatedAt string
    Date-time when catalog item version was created at.
    Description string
    A human-friendly description.
    Id string
    The id of catalog item. One of id or name must be provided.
    createdAt String
    Date-time when catalog item version was created at.
    description String
    A human-friendly description.
    id String
    The id of catalog item. One of id or name must be provided.
    createdAt string
    Date-time when catalog item version was created at.
    description string
    A human-friendly description.
    id string
    The id of catalog item. One of id or name must be provided.
    created_at str
    Date-time when catalog item version was created at.
    description str
    A human-friendly description.
    id str
    The id of catalog item. One of id or name must be provided.
    createdAt String
    Date-time when catalog item version was created at.
    description String
    A human-friendly description.
    id String
    The id of catalog item. One of id or name must be provided.

    Package Details

    Repository
    vra vmware/terraform-provider-vra
    License
    Notes
    This Pulumi package is based on the vra Terraform Provider.
    vra logo
    vra 0.12.0 published on Monday, Apr 14, 2025 by vmware