vSphere

Pulumi Official
Package maintained by Pulumi
v4.1.0 published on Wednesday, Nov 24, 2021 by Pulumi

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/v4/go/vsphere"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

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

Coming soon!

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

Coming soon!

Using getContentLibrary

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 getContentLibrary(args: GetContentLibraryArgs, opts?: InvokeOptions): Promise<GetContentLibraryResult>
function getContentLibraryOutput(args: GetContentLibraryOutputArgs, opts?: InvokeOptions): Output<GetContentLibraryResult>
def get_content_library(name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetContentLibraryResult
def get_content_library_output(name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetContentLibraryResult]
func LookupContentLibrary(ctx *Context, args *LookupContentLibraryArgs, opts ...InvokeOption) (*LookupContentLibraryResult, error)
func LookupContentLibraryOutput(ctx *Context, args *LookupContentLibraryOutputArgs, opts ...InvokeOption) LookupContentLibraryResultOutput

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

public static class GetContentLibrary 
{
    public static Task<GetContentLibraryResult> InvokeAsync(GetContentLibraryArgs args, InvokeOptions? opts = null)
    public static Output<GetContentLibraryResult> Invoke(GetContentLibraryInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetContentLibraryResult> getContentLibrary(GetContentLibraryArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: vsphere:index/getContentLibrary:getContentLibrary
  Arguments:
    # Arguments dictionary

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 string

The name of the Content Library.

name str

The name of the Content Library.

name String

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 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
id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes

This Pulumi package is based on the vsphere Terraform Provider.