Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getContentLibrary

The vsphere.ContentLibrary data source can be used to discover the ID of a Content Library.

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",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-vsphere/sdk/v2/go/vsphere"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := vsphere.LookupContentLibrary(ctx, &vsphere.LookupContentLibraryArgs{
            Name: "Content Library Test",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_vsphere as vsphere

library = vsphere.get_content_library(name="Content Library Test")
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const library = pulumi.output(vsphere.getContentLibrary({
    name: "Content Library Test",
}, { async: true }));

Using getContentLibrary

function getContentLibrary(args: GetContentLibraryArgs, opts?: InvokeOptions): Promise<GetContentLibraryResult>
def get_content_library(name: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetContentLibraryResult
func LookupContentLibrary(ctx *Context, args *LookupContentLibraryArgs, opts ...InvokeOption) (*LookupContentLibraryResult, error)

Note: This function is named LookupContentLibrary in the Go SDK.

public static class GetContentLibrary {
    public static Task<GetContentLibraryResult> InvokeAsync(GetContentLibraryArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Content Library.

Name string

The name of the Content Library.

name string

The name of the Content Library.

name str

The name of the Content Library.

getContentLibrary Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
Id string

The provider-assigned unique ID for this managed resource.

Name string
id string

The provider-assigned unique ID for this managed resource.

name string
id str

The provider-assigned unique ID for this managed resource.

name str

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes
This Pulumi package is based on the vsphere Terraform Provider.