vsphere.getContentLibrary
The vsphere.ContentLibrary
data source can be used to discover the ID of a content library.
NOTE: This resource requires vCenter Server and is not available on direct ESXi host 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",
}));
}
}
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",
}, 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")
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const library = pulumi.output(vsphere.getContentLibrary({
name: "Content Library",
}));
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:
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
vsphere
Terraform Provider.