vSphere v4.12.1 published on Tuesday, Oct 22, 2024 by Pulumi
vsphere.getContentLibrary
Explore with Pulumi AI
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 host connections.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const contentLibrary = vsphere.getContentLibrary({
name: "Content Library",
});
import pulumi
import pulumi_vsphere as vsphere
content_library = vsphere.get_content_library(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, &vsphere.LookupContentLibraryArgs{
Name: "Content Library",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var contentLibrary = VSphere.GetContentLibrary.Invoke(new()
{
Name = "Content Library",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetContentLibraryArgs;
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 contentLibrary = VsphereFunctions.getContentLibrary(GetContentLibraryArgs.builder()
.name("Content Library")
.build());
}
}
variables:
contentLibrary:
fn::invoke:
Function: vsphere:getContentLibrary
Arguments:
name: Content Library
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.