vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getResourceSchema
Explore with Pulumi AI
Provides a VMware Cloud Director generic structure data source. It shows the structure of any VCD resource.
Supported in provider v3.1+
Example Usage
1
Showing a structure with simple attributes only
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const orgStructResourceSchema = vcd.getResourceSchema({
name: "org_struct",
resourceType: "vcd_org",
});
export const orgStruct = orgStructResourceSchema.then(orgStructResourceSchema => orgStructResourceSchema.attributes);
import pulumi
import pulumi_vcd as vcd
org_struct_resource_schema = vcd.get_resource_schema(name="org_struct",
resource_type="vcd_org")
pulumi.export("orgStruct", org_struct_resource_schema.attributes)
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 {
orgStructResourceSchema, err := vcd.GetResourceSchema(ctx, &vcd.GetResourceSchemaArgs{
Name: "org_struct",
ResourceType: "vcd_org",
}, nil)
if err != nil {
return err
}
ctx.Export("orgStruct", orgStructResourceSchema.Attributes)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var orgStructResourceSchema = Vcd.GetResourceSchema.Invoke(new()
{
Name = "org_struct",
ResourceType = "vcd_org",
});
return new Dictionary<string, object?>
{
["orgStruct"] = orgStructResourceSchema.Apply(getResourceSchemaResult => getResourceSchemaResult.Attributes),
};
});
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.GetResourceSchemaArgs;
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 orgStructResourceSchema = VcdFunctions.getResourceSchema(GetResourceSchemaArgs.builder()
.name("org_struct")
.resourceType("vcd_org")
.build());
ctx.export("orgStruct", orgStructResourceSchema.applyValue(getResourceSchemaResult -> getResourceSchemaResult.attributes()));
}
}
variables:
orgStructResourceSchema:
fn::invoke:
function: vcd:getResourceSchema
arguments:
name: org_struct
resourceType: vcd_org
outputs:
# Shows the organization attributes
orgStruct: ${orgStructResourceSchema.attributes} # /*
# output:
# org_struct = [
# {
# "computed" = false
# "description" = "When destroying use delete_force=true with delete_recursive=true to remove an org and any objects it contains, regardless of their state."
# "name" = "delete_force"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "bool"
# },
# {
# "computed" = false
# "description" = ""
# "name" = "full_name"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = ""
# "name" = "name"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "Specifies this organization's default for virtual machine boot delay after power on."
# "name" = "delay_after_power_on_seconds"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "number"
# },
# {
# "computed" = false
# "description" = "When destroying use delete_recursive=True to remove the org and any objects it contains that are in a state that normally allows removal."
# "name" = "delete_recursive"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "bool"
# },
# {
# "computed" = false
# "description" = "True if this organization is enabled (allows login and all other operations)."
# "name" = "is_enabled"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "bool"
# },
# {
# "computed" = false
# "description" = "Maximum number of virtual machines that can be deployed simultaneously by a member of this organization. (0 = unlimited)"
# "name" = "deployed_vm_quota"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "number"
# },
# {
# "computed" = false
# "description" = "True if this organization is allowed to share catalogs."
# "name" = "can_publish_catalogs"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "bool"
# },
# {
# "computed" = true
# "description" = ""
# "name" = "id"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = ""
# "name" = "description"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "Maximum number of virtual machines in vApps or vApp templates that can be stored in an undeployed state by a member of this organization. (0 = unlimited)"
# "name" = "stored_vm_quota"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "number"
# },
# ]
# */
2
Showing a structure with both simple and compound attributes
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const networkIsolatedStruct = vcd.getResourceSchema({
name: "net_struct",
resourceType: "vcd_network_isolated",
});
export const netStruct = data.vcd_resource_schema.net_struct;
import pulumi
import pulumi_vcd as vcd
network_isolated_struct = vcd.get_resource_schema(name="net_struct",
resource_type="vcd_network_isolated")
pulumi.export("netStruct", data["vcd_resource_schema"]["net_struct"])
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 {
_, err := vcd.GetResourceSchema(ctx, &vcd.GetResourceSchemaArgs{
Name: "net_struct",
ResourceType: "vcd_network_isolated",
}, nil)
if err != nil {
return err
}
ctx.Export("netStruct", data.Vcd_resource_schema.Net_struct)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var networkIsolatedStruct = Vcd.GetResourceSchema.Invoke(new()
{
Name = "net_struct",
ResourceType = "vcd_network_isolated",
});
return new Dictionary<string, object?>
{
["netStruct"] = data.Vcd_resource_schema.Net_struct,
};
});
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.GetResourceSchemaArgs;
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 networkIsolatedStruct = VcdFunctions.getResourceSchema(GetResourceSchemaArgs.builder()
.name("net_struct")
.resourceType("vcd_network_isolated")
.build());
ctx.export("netStruct", data.vcd_resource_schema().net_struct());
}
}
variables:
networkIsolatedStruct:
fn::invoke:
function: vcd:getResourceSchema
arguments:
name: net_struct
resourceType: vcd_network_isolated
outputs:
netStruct: ${data.vcd_resource_schema.net_struct} # /*
# output:
# struct_network_isolated = {
# "attributes" = [
# {
# "computed" = true
# "description" = "Network Hyper Reference"
# "name" = "href"
# "optional" = false
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = true
# "description" = ""
# "name" = "id"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "First DNS server to use"
# "name" = "dns1"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "The name of VDC to use, optional if defined at provider level"
# "name" = "vdc"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "Optional description for the network"
# "name" = "description"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "The gateway for this network"
# "name" = "gateway"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "The netmask for the new network"
# "name" = "netmask"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "A unique name for this network"
# "name" = "name"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations"
# "name" = "org"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "Second DNS server to use"
# "name" = "dns2"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "A FQDN for the virtual machines on this network"
# "name" = "dns_suffix"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "Defines if this network is shared between multiple VDCs in the Org"
# "name" = "shared"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "bool"
# },
# ]
# "block_attributes" = [
# {
# "attributes" = [
# {
# "computed" = false
# "description" = "The first address in the IP Range"
# "name" = "start_address"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "The final address in the IP Range"
# "name" = "end_address"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "string"
# },
# ]
# "name" = "static_ip_pool"
# "nesting_mode" = "NestingSet"
# },
# {
# "attributes" = [
# {
# "computed" = false
# "description" = "The first address in the IP Range"
# "name" = "start_address"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "The final address in the IP Range"
# "name" = "end_address"
# "optional" = false
# "required" = true
# "sensitive" = false
# "type" = "string"
# },
# {
# "computed" = false
# "description" = "The default DHCP lease time to use"
# "name" = "default_lease_time"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "number"
# },
# {
# "computed" = false
# "description" = "The maximum DHCP lease time to use"
# "name" = "max_lease_time"
# "optional" = true
# "required" = false
# "sensitive" = false
# "type" = "number"
# },
# ]
# "name" = "dhcp_pool"
# "nesting_mode" = "NestingSet"
# },
# ]
# "id" = "struct_network_isolated"
# "name" = "struct_network_isolated"
# "resource_type" = "vcd_network_isolated"
# }
# */
Using getResourceSchema
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 getResourceSchema(args: GetResourceSchemaArgs, opts?: InvokeOptions): Promise<GetResourceSchemaResult>
function getResourceSchemaOutput(args: GetResourceSchemaOutputArgs, opts?: InvokeOptions): Output<GetResourceSchemaResult>
def get_resource_schema(id: Optional[str] = None,
name: Optional[str] = None,
resource_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResourceSchemaResult
def get_resource_schema_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResourceSchemaResult]
func GetResourceSchema(ctx *Context, args *GetResourceSchemaArgs, opts ...InvokeOption) (*GetResourceSchemaResult, error)
func GetResourceSchemaOutput(ctx *Context, args *GetResourceSchemaOutputArgs, opts ...InvokeOption) GetResourceSchemaResultOutput
> Note: This function is named GetResourceSchema
in the Go SDK.
public static class GetResourceSchema
{
public static Task<GetResourceSchemaResult> InvokeAsync(GetResourceSchemaArgs args, InvokeOptions? opts = null)
public static Output<GetResourceSchemaResult> Invoke(GetResourceSchemaInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetResourceSchemaResult> getResourceSchema(GetResourceSchemaArgs args, InvokeOptions options)
public static Output<GetResourceSchemaResult> getResourceSchema(GetResourceSchemaArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getResourceSchema:getResourceSchema
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- An unique name to identify the data source
- Resource
Type string - Which resource we want to list. It needs to use the full name of the resource (i.e. "vcd.Org", not simply "org")
- Id string
- Name string
- An unique name to identify the data source
- Resource
Type string - Which resource we want to list. It needs to use the full name of the resource (i.e. "vcd.Org", not simply "org")
- Id string
- name String
- An unique name to identify the data source
- resource
Type String - Which resource we want to list. It needs to use the full name of the resource (i.e. "vcd.Org", not simply "org")
- id String
- name string
- An unique name to identify the data source
- resource
Type string - Which resource we want to list. It needs to use the full name of the resource (i.e. "vcd.Org", not simply "org")
- id string
- name str
- An unique name to identify the data source
- resource_
type str - Which resource we want to list. It needs to use the full name of the resource (i.e. "vcd.Org", not simply "org")
- id str
- name String
- An unique name to identify the data source
- resource
Type String - Which resource we want to list. It needs to use the full name of the resource (i.e. "vcd.Org", not simply "org")
- id String
getResourceSchema Result
The following output properties are available:
- Attributes
List<Get
Resource Schema Attribute> - (Computed) Same composition of the simple
attributes
above. - Block
Attributes List<GetResource Schema Block Attribute> - (Computed) The list of compound attributes Each bock attribute is made of:
- Id string
- Name string
- the attribute name
- Resource
Type string
- Attributes
[]Get
Resource Schema Attribute - (Computed) Same composition of the simple
attributes
above. - Block
Attributes []GetResource Schema Block Attribute - (Computed) The list of compound attributes Each bock attribute is made of:
- Id string
- Name string
- the attribute name
- Resource
Type string
- attributes
List<Get
Resource Schema Attribute> - (Computed) Same composition of the simple
attributes
above. - block
Attributes List<GetResource Schema Block Attribute> - (Computed) The list of compound attributes Each bock attribute is made of:
- id String
- name String
- the attribute name
- resource
Type String
- attributes
Get
Resource Schema Attribute[] - (Computed) Same composition of the simple
attributes
above. - block
Attributes GetResource Schema Block Attribute[] - (Computed) The list of compound attributes Each bock attribute is made of:
- id string
- name string
- the attribute name
- resource
Type string
- attributes
Sequence[Get
Resource Schema Attribute] - (Computed) Same composition of the simple
attributes
above. - block_
attributes Sequence[GetResource Schema Block Attribute] - (Computed) The list of compound attributes Each bock attribute is made of:
- id str
- name str
- the attribute name
- resource_
type str
- attributes List<Property Map>
- (Computed) Same composition of the simple
attributes
above. - block
Attributes List<Property Map> - (Computed) The list of compound attributes Each bock attribute is made of:
- id String
- name String
- the attribute name
- resource
Type String
Supporting Types
GetResourceSchemaAttribute
- Computed bool
- whether the attribute is computed
- Description string
- an optional description of the attribute
- Name string
- An unique name to identify the data source
- Optional bool
- whether the attribute is optional
- Required bool
- whether the attribute is required
- Sensitive bool
- whether the attribute is sensitive
- Type string
- Computed bool
- whether the attribute is computed
- Description string
- an optional description of the attribute
- Name string
- An unique name to identify the data source
- Optional bool
- whether the attribute is optional
- Required bool
- whether the attribute is required
- Sensitive bool
- whether the attribute is sensitive
- Type string
- computed Boolean
- whether the attribute is computed
- description String
- an optional description of the attribute
- name String
- An unique name to identify the data source
- optional Boolean
- whether the attribute is optional
- required Boolean
- whether the attribute is required
- sensitive Boolean
- whether the attribute is sensitive
- type String
- computed boolean
- whether the attribute is computed
- description string
- an optional description of the attribute
- name string
- An unique name to identify the data source
- optional boolean
- whether the attribute is optional
- required boolean
- whether the attribute is required
- sensitive boolean
- whether the attribute is sensitive
- type string
- computed Boolean
- whether the attribute is computed
- description String
- an optional description of the attribute
- name String
- An unique name to identify the data source
- optional Boolean
- whether the attribute is optional
- required Boolean
- whether the attribute is required
- sensitive Boolean
- whether the attribute is sensitive
- type String
GetResourceSchemaBlockAttribute
- Attributes
List<Get
Resource Schema Block Attribute Attribute> - (Computed) Same composition of the simple
attributes
above. - Name string
- An unique name to identify the data source
- Nesting
Mode string
- Attributes
[]Get
Resource Schema Block Attribute Attribute - (Computed) Same composition of the simple
attributes
above. - Name string
- An unique name to identify the data source
- Nesting
Mode string
- attributes
List<Get
Resource Schema Block Attribute Attribute> - (Computed) Same composition of the simple
attributes
above. - name String
- An unique name to identify the data source
- nesting
Mode String
- attributes
Get
Resource Schema Block Attribute Attribute[] - (Computed) Same composition of the simple
attributes
above. - name string
- An unique name to identify the data source
- nesting
Mode string
- attributes
Sequence[Get
Resource Schema Block Attribute Attribute] - (Computed) Same composition of the simple
attributes
above. - name str
- An unique name to identify the data source
- nesting_
mode str
- attributes List<Property Map>
- (Computed) Same composition of the simple
attributes
above. - name String
- An unique name to identify the data source
- nesting
Mode String
GetResourceSchemaBlockAttributeAttribute
- Computed bool
- whether the attribute is computed
- Description string
- an optional description of the attribute
- Name string
- An unique name to identify the data source
- Optional bool
- whether the attribute is optional
- Required bool
- whether the attribute is required
- Sensitive bool
- whether the attribute is sensitive
- Type string
- Computed bool
- whether the attribute is computed
- Description string
- an optional description of the attribute
- Name string
- An unique name to identify the data source
- Optional bool
- whether the attribute is optional
- Required bool
- whether the attribute is required
- Sensitive bool
- whether the attribute is sensitive
- Type string
- computed Boolean
- whether the attribute is computed
- description String
- an optional description of the attribute
- name String
- An unique name to identify the data source
- optional Boolean
- whether the attribute is optional
- required Boolean
- whether the attribute is required
- sensitive Boolean
- whether the attribute is sensitive
- type String
- computed boolean
- whether the attribute is computed
- description string
- an optional description of the attribute
- name string
- An unique name to identify the data source
- optional boolean
- whether the attribute is optional
- required boolean
- whether the attribute is required
- sensitive boolean
- whether the attribute is sensitive
- type string
- computed Boolean
- whether the attribute is computed
- description String
- an optional description of the attribute
- name String
- An unique name to identify the data source
- optional Boolean
- whether the attribute is optional
- required Boolean
- whether the attribute is required
- sensitive Boolean
- whether the attribute is sensitive
- type String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.