vSphere

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

getVappContainer

The vsphere.VappContainer data source can be used to discover the ID of a vApp container in vSphere. This is useful to fetch the ID of a vApp container that you want to use to create virtual machines in using the vsphere.VirtualMachine resource.

Example Usage

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
    public MyStack()
    {
        var datacenter = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
        {
            Name = "dc1",
        }));
        var pool = datacenter.Apply(datacenter => Output.Create(VSphere.GetVappContainer.InvokeAsync(new VSphere.GetVappContainerArgs
        {
            DatacenterId = datacenter.Id,
            Name = "vapp-container-1",
        })));
    }

}
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 {
		opt0 := "dc1"
		datacenter, err := vsphere.LookupDatacenter(ctx, &GetDatacenterArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		_, err = vsphere.LookupVappContainer(ctx, &GetVappContainerArgs{
			DatacenterId: datacenter.Id,
			Name:         "vapp-container-1",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_vsphere as vsphere

datacenter = vsphere.get_datacenter(name="dc1")
pool = vsphere.get_vapp_container(datacenter_id=datacenter.id,
    name="vapp-container-1")
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const datacenter = pulumi.output(vsphere.getDatacenter({
    name: "dc1",
}));
const pool = datacenter.apply(datacenter => vsphere.getVappContainer({
    datacenterId: datacenter.id,
    name: "vapp-container-1",
}));

Coming soon!

Using getVappContainer

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 getVappContainer(args: GetVappContainerArgs, opts?: InvokeOptions): Promise<GetVappContainerResult>
function getVappContainerOutput(args: GetVappContainerOutputArgs, opts?: InvokeOptions): Output<GetVappContainerResult>
def get_vapp_container(datacenter_id: Optional[str] = None,
                       name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetVappContainerResult
def get_vapp_container_output(datacenter_id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetVappContainerResult]
func LookupVappContainer(ctx *Context, args *LookupVappContainerArgs, opts ...InvokeOption) (*LookupVappContainerResult, error)
func LookupVappContainerOutput(ctx *Context, args *LookupVappContainerOutputArgs, opts ...InvokeOption) LookupVappContainerResultOutput

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

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

The following arguments are supported:

DatacenterId string

The managed object reference ID of the datacenter the vApp container is located in.

Name string

The name of the vApp container. This can be a name or path.

DatacenterId string

The managed object reference ID of the datacenter the vApp container is located in.

Name string

The name of the vApp container. This can be a name or path.

datacenterId String

The managed object reference ID of the datacenter the vApp container is located in.

name String

The name of the vApp container. This can be a name or path.

datacenterId string

The managed object reference ID of the datacenter the vApp container is located in.

name string

The name of the vApp container. This can be a name or path.

datacenter_id str

The managed object reference ID of the datacenter the vApp container is located in.

name str

The name of the vApp container. This can be a name or path.

datacenterId String

The managed object reference ID of the datacenter the vApp container is located in.

name String

The name of the vApp container. This can be a name or path.

getVappContainer Result

The following output properties are available:

DatacenterId string
Id string

The provider-assigned unique ID for this managed resource.

Name string
DatacenterId string
Id string

The provider-assigned unique ID for this managed resource.

Name string
datacenterId String
id String

The provider-assigned unique ID for this managed resource.

name String
datacenterId string
id string

The provider-assigned unique ID for this managed resource.

name string
datacenter_id str
id str

The provider-assigned unique ID for this managed resource.

name str
datacenterId String
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.