GetContentLibraryItem
The vsphere..ContentLibraryItem data source can be used to discover the ID of a Content Library item.
NOTE: This resource requires vCenter and is not available on direct ESXi connections.
Example Usage
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var library = Output.Create(VSphere.GetContentLibrary.InvokeAsync(new VSphere.GetContentLibraryArgs
{
Name = "Content Library Test",
}));
var item = library.Apply(library => Output.Create(VSphere.GetContentLibraryItem.InvokeAsync(new VSphere.GetContentLibraryItemArgs
{
Name = "Ubuntu Bionic 18.04",
LibraryId = library.Id,
})));
}
}
Coming soon!
import pulumi
import pulumi_vsphere as vsphere
library = vsphere.get_content_library(name="Content Library Test")
item = vsphere.get_content_library_item(name="Ubuntu Bionic 18.04",
library_id=library.id)import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const library = vsphere.getContentLibrary({
name: "Content Library Test",
});
const item = library.then(library => vsphere.getContentLibraryItem({
name: "Ubuntu Bionic 18.04",
libraryId: library.id,
}));Using GetContentLibraryItem
function getContentLibraryItem(args: GetContentLibraryItemArgs, opts?: InvokeOptions): Promise<GetContentLibraryItemResult>function get_content_library_item(library_id=None, name=None, opts=None)func LookupContentLibraryItem(ctx *Context, args *LookupContentLibraryItemArgs, opts ...InvokeOption) (*LookupContentLibraryItemResult, error)Note: This function is named
LookupContentLibraryItemin the Go SDK.
public static class GetContentLibraryItem {
public static Task<GetContentLibraryItemResult> InvokeAsync(GetContentLibraryItemArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- library_
id str The ID of the Content Library the item exists in.
- name str
The name of the Content Library.
GetContentLibraryItem Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphereTerraform Provider.