vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getVapp
Explore with Pulumi AI
Provides a VMware Cloud Director vApp data source. This can be used to reference vApps.
Supported in provider v2.5+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const test_tf = vcd.getVapp({
name: "test-tf",
org: "tf",
vdc: "vdc-tf",
});
export const id = test_tf.then(test_tf => test_tf.id);
export const name = test_tf.then(test_tf => test_tf.name);
export const description = test_tf.then(test_tf => test_tf.description);
export const href = test_tf.then(test_tf => test_tf.href);
export const statusText = test_tf.then(test_tf => test_tf.statusText);
import pulumi
import pulumi_vcd as vcd
test_tf = vcd.get_vapp(name="test-tf",
org="tf",
vdc="vdc-tf")
pulumi.export("id", test_tf.id)
pulumi.export("name", test_tf.name)
pulumi.export("description", test_tf.description)
pulumi.export("href", test_tf.href)
pulumi.export("statusText", test_tf.status_text)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test_tf, err := vcd.LookupVapp(ctx, &vcd.LookupVappArgs{
Name: "test-tf",
Org: pulumi.StringRef("tf"),
Vdc: pulumi.StringRef("vdc-tf"),
}, nil)
if err != nil {
return err
}
ctx.Export("id", test_tf.Id)
ctx.Export("name", test_tf.Name)
ctx.Export("description", test_tf.Description)
ctx.Export("href", test_tf.Href)
ctx.Export("statusText", test_tf.StatusText)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var test_tf = Vcd.GetVapp.Invoke(new()
{
Name = "test-tf",
Org = "tf",
Vdc = "vdc-tf",
});
return new Dictionary<string, object?>
{
["id"] = test_tf.Apply(test_tf => test_tf.Apply(getVappResult => getVappResult.Id)),
["name"] = test_tf.Apply(test_tf => test_tf.Apply(getVappResult => getVappResult.Name)),
["description"] = test_tf.Apply(test_tf => test_tf.Apply(getVappResult => getVappResult.Description)),
["href"] = test_tf.Apply(test_tf => test_tf.Apply(getVappResult => getVappResult.Href)),
["statusText"] = test_tf.Apply(test_tf => test_tf.Apply(getVappResult => getVappResult.StatusText)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetVappArgs;
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 test-tf = VcdFunctions.getVapp(GetVappArgs.builder()
.name("test-tf")
.org("tf")
.vdc("vdc-tf")
.build());
ctx.export("id", test_tf.id());
ctx.export("name", test_tf.name());
ctx.export("description", test_tf.description());
ctx.export("href", test_tf.href());
ctx.export("statusText", test_tf.statusText());
}
}
variables:
test-tf:
fn::invoke:
function: vcd:getVapp
arguments:
name: test-tf
org: tf
vdc: vdc-tf
outputs:
id: ${["test-tf"].id}
name: ${["test-tf"].name}
description: ${["test-tf"].description}
href: ${["test-tf"].href}
statusText: ${["test-tf"].statusText}
Metadata
The metadata_entry (v3.8+) is a set of metadata entries that have the following structure:
key- Key of this metadata entry.value- Value of this metadata entry.type- Type of this metadata entry. One of:MetadataStringValue,MetadataNumberValue,MetadataDateTimeValue,MetadataBooleanValue.user_access- User access level for this metadata entry. One of:PRIVATE(hidden),READONLY(read only),READWRITE(read/write).is_system- Domain for this metadata entry. true if it belongs toSYSTEM, false if it belongs toGENERAL.
Using getVapp
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 getVapp(args: GetVappArgs, opts?: InvokeOptions): Promise<GetVappResult>
function getVappOutput(args: GetVappOutputArgs, opts?: InvokeOptions): Output<GetVappResult>def get_vapp(id: Optional[str] = None,
name: Optional[str] = None,
org: Optional[str] = None,
vdc: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVappResult
def get_vapp_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
org: Optional[pulumi.Input[str]] = None,
vdc: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVappResult]func LookupVapp(ctx *Context, args *LookupVappArgs, opts ...InvokeOption) (*LookupVappResult, error)
func LookupVappOutput(ctx *Context, args *LookupVappOutputArgs, opts ...InvokeOption) LookupVappResultOutput> Note: This function is named LookupVapp in the Go SDK.
public static class GetVapp
{
public static Task<GetVappResult> InvokeAsync(GetVappArgs args, InvokeOptions? opts = null)
public static Output<GetVappResult> Invoke(GetVappInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVappResult> getVapp(GetVappArgs args, InvokeOptions options)
public static Output<GetVappResult> getVapp(GetVappArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getVapp:getVapp
arguments:
# arguments dictionaryThe following arguments are supported:
getVapp Result
The following output properties are available:
- Description string
- An optional description for the vApp
- Guest
Properties Dictionary<string, string> - Key value map of vApp guest properties.
- Href string
- The vApp Hyper Reference
- Id string
- Inherited
Metadata Dictionary<string, string> - (v3.11+; VCD 10.5.1+) A map that contains read-only metadata that is automatically added by VCD (10.5.1+) and provides
details on the origin of the vApp (e.g.
vapp.origin.id,vapp.origin.name,vapp.origin.type). - Leases
List<Get
Vapp Lease> - (v3.5+) - The information about the vApp lease. It includes the following fields:
- Metadata Dictionary<string, string>
- (Deprecated) Use
metadata_entryinstead. Key value map of metadata assigned to this vApp. Key and value can be any string. - Metadata
Entries List<GetVapp Metadata Entry> - A set of metadata entries assigned to this vApp. See Metadata section for details.
- Name string
- Status double
- The vApp status as a numeric code
- Status
Text string - The vApp status as text.
- Vapp
Network List<string>Names - (3.13.0+) A list of vApp network names included in this vApp
- Vapp
Org List<string>Network Names - (v3.13.0+) A list of vApp Org network names included in this vApp
- Vm
Names List<string> - (v3.13.0+) A list of VM names included in this vApp
- Org string
- Vdc string
- Description string
- An optional description for the vApp
- Guest
Properties map[string]string - Key value map of vApp guest properties.
- Href string
- The vApp Hyper Reference
- Id string
- Inherited
Metadata map[string]string - (v3.11+; VCD 10.5.1+) A map that contains read-only metadata that is automatically added by VCD (10.5.1+) and provides
details on the origin of the vApp (e.g.
vapp.origin.id,vapp.origin.name,vapp.origin.type). - Leases
[]Get
Vapp Lease - (v3.5+) - The information about the vApp lease. It includes the following fields:
- Metadata map[string]string
- (Deprecated) Use
metadata_entryinstead. Key value map of metadata assigned to this vApp. Key and value can be any string. - Metadata
Entries []GetVapp Metadata Entry - A set of metadata entries assigned to this vApp. See Metadata section for details.
- Name string
- Status float64
- The vApp status as a numeric code
- Status
Text string - The vApp status as text.
- Vapp
Network []stringNames - (3.13.0+) A list of vApp network names included in this vApp
- Vapp
Org []stringNetwork Names - (v3.13.0+) A list of vApp Org network names included in this vApp
- Vm
Names []string - (v3.13.0+) A list of VM names included in this vApp
- Org string
- Vdc string
- description String
- An optional description for the vApp
- guest
Properties Map<String,String> - Key value map of vApp guest properties.
- href String
- The vApp Hyper Reference
- id String
- inherited
Metadata Map<String,String> - (v3.11+; VCD 10.5.1+) A map that contains read-only metadata that is automatically added by VCD (10.5.1+) and provides
details on the origin of the vApp (e.g.
vapp.origin.id,vapp.origin.name,vapp.origin.type). - leases
List<Get
Vapp Lease> - (v3.5+) - The information about the vApp lease. It includes the following fields:
- metadata Map<String,String>
- (Deprecated) Use
metadata_entryinstead. Key value map of metadata assigned to this vApp. Key and value can be any string. - metadata
Entries List<GetVapp Metadata Entry> - A set of metadata entries assigned to this vApp. See Metadata section for details.
- name String
- status Double
- The vApp status as a numeric code
- status
Text String - The vApp status as text.
- vapp
Network List<String>Names - (3.13.0+) A list of vApp network names included in this vApp
- vapp
Org List<String>Network Names - (v3.13.0+) A list of vApp Org network names included in this vApp
- vm
Names List<String> - (v3.13.0+) A list of VM names included in this vApp
- org String
- vdc String
- description string
- An optional description for the vApp
- guest
Properties {[key: string]: string} - Key value map of vApp guest properties.
- href string
- The vApp Hyper Reference
- id string
- inherited
Metadata {[key: string]: string} - (v3.11+; VCD 10.5.1+) A map that contains read-only metadata that is automatically added by VCD (10.5.1+) and provides
details on the origin of the vApp (e.g.
vapp.origin.id,vapp.origin.name,vapp.origin.type). - leases
Get
Vapp Lease[] - (v3.5+) - The information about the vApp lease. It includes the following fields:
- metadata {[key: string]: string}
- (Deprecated) Use
metadata_entryinstead. Key value map of metadata assigned to this vApp. Key and value can be any string. - metadata
Entries GetVapp Metadata Entry[] - A set of metadata entries assigned to this vApp. See Metadata section for details.
- name string
- status number
- The vApp status as a numeric code
- status
Text string - The vApp status as text.
- vapp
Network string[]Names - (3.13.0+) A list of vApp network names included in this vApp
- vapp
Org string[]Network Names - (v3.13.0+) A list of vApp Org network names included in this vApp
- vm
Names string[] - (v3.13.0+) A list of VM names included in this vApp
- org string
- vdc string
- description str
- An optional description for the vApp
- guest_
properties Mapping[str, str] - Key value map of vApp guest properties.
- href str
- The vApp Hyper Reference
- id str
- inherited_
metadata Mapping[str, str] - (v3.11+; VCD 10.5.1+) A map that contains read-only metadata that is automatically added by VCD (10.5.1+) and provides
details on the origin of the vApp (e.g.
vapp.origin.id,vapp.origin.name,vapp.origin.type). - leases
Sequence[Get
Vapp Lease] - (v3.5+) - The information about the vApp lease. It includes the following fields:
- metadata Mapping[str, str]
- (Deprecated) Use
metadata_entryinstead. Key value map of metadata assigned to this vApp. Key and value can be any string. - metadata_
entries Sequence[GetVapp Metadata Entry] - A set of metadata entries assigned to this vApp. See Metadata section for details.
- name str
- status float
- The vApp status as a numeric code
- status_
text str - The vApp status as text.
- vapp_
network_ Sequence[str]names - (3.13.0+) A list of vApp network names included in this vApp
- vapp_
org_ Sequence[str]network_ names - (v3.13.0+) A list of vApp Org network names included in this vApp
- vm_
names Sequence[str] - (v3.13.0+) A list of VM names included in this vApp
- org str
- vdc str
- description String
- An optional description for the vApp
- guest
Properties Map<String> - Key value map of vApp guest properties.
- href String
- The vApp Hyper Reference
- id String
- inherited
Metadata Map<String> - (v3.11+; VCD 10.5.1+) A map that contains read-only metadata that is automatically added by VCD (10.5.1+) and provides
details on the origin of the vApp (e.g.
vapp.origin.id,vapp.origin.name,vapp.origin.type). - leases List<Property Map>
- (v3.5+) - The information about the vApp lease. It includes the following fields:
- metadata Map<String>
- (Deprecated) Use
metadata_entryinstead. Key value map of metadata assigned to this vApp. Key and value can be any string. - metadata
Entries List<Property Map> - A set of metadata entries assigned to this vApp. See Metadata section for details.
- name String
- status Number
- The vApp status as a numeric code
- status
Text String - The vApp status as text.
- vapp
Network List<String>Names - (3.13.0+) A list of vApp network names included in this vApp
- vapp
Org List<String>Network Names - (v3.13.0+) A list of vApp Org network names included in this vApp
- vm
Names List<String> - (v3.13.0+) A list of VM names included in this vApp
- org String
- vdc String
Supporting Types
GetVappLease
- Runtime
Lease doubleIn Sec - How long any of the VMs in the vApp can run before the vApp is automatically powered off or suspended. 0 means never expires.
- Storage
Lease doubleIn Sec - How long the vApp is available before being automatically deleted or marked as expired. 0 means never expires.
- Runtime
Lease float64In Sec - How long any of the VMs in the vApp can run before the vApp is automatically powered off or suspended. 0 means never expires.
- Storage
Lease float64In Sec - How long the vApp is available before being automatically deleted or marked as expired. 0 means never expires.
- runtime
Lease DoubleIn Sec - How long any of the VMs in the vApp can run before the vApp is automatically powered off or suspended. 0 means never expires.
- storage
Lease DoubleIn Sec - How long the vApp is available before being automatically deleted or marked as expired. 0 means never expires.
- runtime
Lease numberIn Sec - How long any of the VMs in the vApp can run before the vApp is automatically powered off or suspended. 0 means never expires.
- storage
Lease numberIn Sec - How long the vApp is available before being automatically deleted or marked as expired. 0 means never expires.
- runtime_
lease_ floatin_ sec - How long any of the VMs in the vApp can run before the vApp is automatically powered off or suspended. 0 means never expires.
- storage_
lease_ floatin_ sec - How long the vApp is available before being automatically deleted or marked as expired. 0 means never expires.
- runtime
Lease NumberIn Sec - How long any of the VMs in the vApp can run before the vApp is automatically powered off or suspended. 0 means never expires.
- storage
Lease NumberIn Sec - How long the vApp is available before being automatically deleted or marked as expired. 0 means never expires.
GetVappMetadataEntry
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- is
System Boolean - key String
- type String
- user
Access String - value String
- is
System boolean - key string
- type string
- user
Access string - value string
- is_
system bool - key str
- type str
- user_
access str - value str
- is
System Boolean - key String
- type String
- user
Access String - value String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcdTerraform Provider.