vra 0.12.0 published on Monday, Apr 14, 2025 by vmware
vra.getZone
Explore with Pulumi AI
Example Usage
S
This is an example of how to read a zone data source.
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const test_zone = vra.getZone({
name: _var.zone_name,
});
import pulumi
import pulumi_vra as vra
test_zone = vra.get_zone(name=var["zone_name"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vra.LookupZone(ctx, &vra.LookupZoneArgs{
Name: pulumi.StringRef(_var.Zone_name),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() =>
{
var test_zone = Vra.GetZone.Invoke(new()
{
Name = @var.Zone_name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetZoneArgs;
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-zone = VraFunctions.getZone(GetZoneArgs.builder()
.name(var_.zone_name())
.build());
}
}
variables:
test-zone:
fn::invoke:
function: vra:getZone
arguments:
name: ${var.zone_name}
A zone data source supports the following arguments:
Using getZone
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 getZone(args: GetZoneArgs, opts?: InvokeOptions): Promise<GetZoneResult>
function getZoneOutput(args: GetZoneOutputArgs, opts?: InvokeOptions): Output<GetZoneResult>
def get_zone(id: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[GetZoneTag]] = None,
tags_to_matches: Optional[Sequence[GetZoneTagsToMatch]] = None,
opts: Optional[InvokeOptions] = None) -> GetZoneResult
def get_zone_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetZoneTagArgs]]]] = None,
tags_to_matches: Optional[pulumi.Input[Sequence[pulumi.Input[GetZoneTagsToMatchArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetZoneResult]
func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)
func LookupZoneOutput(ctx *Context, args *LookupZoneOutputArgs, opts ...InvokeOption) LookupZoneResultOutput
> Note: This function is named LookupZone
in the Go SDK.
public static class GetZone
{
public static Task<GetZoneResult> InvokeAsync(GetZoneArgs args, InvokeOptions? opts = null)
public static Output<GetZoneResult> Invoke(GetZoneInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
public static Output<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
fn::invoke:
function: vra:index/getZone:getZone
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The id of the zone resource instance.
- Name string
- A human-friendly name used as an identifier for the zone resource instance.
- List<Get
Zone Tag> - A set of tag keys and optional values that were set on this resource:
- List<Get
Zone Tags To Match> - A set of tag keys and optional values for compute resource filtering:
- Id string
- The id of the zone resource instance.
- Name string
- A human-friendly name used as an identifier for the zone resource instance.
- []Get
Zone Tag - A set of tag keys and optional values that were set on this resource:
- []Get
Zone Tags To Match - A set of tag keys and optional values for compute resource filtering:
- id String
- The id of the zone resource instance.
- name String
- A human-friendly name used as an identifier for the zone resource instance.
- List<Get
Zone Tag> - A set of tag keys and optional values that were set on this resource:
- List<Get
Zone Tags To Match> - A set of tag keys and optional values for compute resource filtering:
- id string
- The id of the zone resource instance.
- name string
- A human-friendly name used as an identifier for the zone resource instance.
- Get
Zone Tag[] - A set of tag keys and optional values that were set on this resource:
- Get
Zone Tags To Match[] - A set of tag keys and optional values for compute resource filtering:
- id str
- The id of the zone resource instance.
- name str
- A human-friendly name used as an identifier for the zone resource instance.
- Sequence[Get
Zone Tag] - A set of tag keys and optional values that were set on this resource:
- Sequence[Get
Zone Tags To Match] - A set of tag keys and optional values for compute resource filtering:
- id String
- The id of the zone resource instance.
- name String
- A human-friendly name used as an identifier for the zone resource instance.
- List<Property Map>
- A set of tag keys and optional values that were set on this resource:
- List<Property Map>
- A set of tag keys and optional values for compute resource filtering:
getZone Result
The following output properties are available:
- Cloud
Account stringId - The ID of the cloud account this zone belongs to.
- Compute
Ids List<string> - The ids of the compute resources that has been explicitly assigned to this zone.
- Created
At string - Date when the entity was created. The date is in ISO 8601 and UTC.
- Custom
Properties Dictionary<string, string> - A list of key value pair of properties that will be used.
- Description string
- A human-friendly description.
- External
Region stringId - The id of the region for which this zone is defined.
- Folder string
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- Id string
- Links
List<Get
Zone Link> - HATEOAS of the entity.
- Name string
- Org
Id string - The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- Placement
Policy string - The placement policy for the zone. One of
DEFAULT
,SPREAD
orBINPACK
. - Updated
At string - Date when the entity was last updated. The date is ISO 8601 and UTC.
- List<Get
Zone Tag> - A set of tag keys and optional values that were set on this resource:
- List<Get
Zone Tags To Match> - A set of tag keys and optional values for compute resource filtering:
- Cloud
Account stringId - The ID of the cloud account this zone belongs to.
- Compute
Ids []string - The ids of the compute resources that has been explicitly assigned to this zone.
- Created
At string - Date when the entity was created. The date is in ISO 8601 and UTC.
- Custom
Properties map[string]string - A list of key value pair of properties that will be used.
- Description string
- A human-friendly description.
- External
Region stringId - The id of the region for which this zone is defined.
- Folder string
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- Id string
- Links
[]Get
Zone Link - HATEOAS of the entity.
- Name string
- Org
Id string - The id of the organization this entity belongs to.
- Owner string
- Email of the user that owns the entity.
- Placement
Policy string - The placement policy for the zone. One of
DEFAULT
,SPREAD
orBINPACK
. - Updated
At string - Date when the entity was last updated. The date is ISO 8601 and UTC.
- []Get
Zone Tag - A set of tag keys and optional values that were set on this resource:
- []Get
Zone Tags To Match - A set of tag keys and optional values for compute resource filtering:
- cloud
Account StringId - The ID of the cloud account this zone belongs to.
- compute
Ids List<String> - The ids of the compute resources that has been explicitly assigned to this zone.
- created
At String - Date when the entity was created. The date is in ISO 8601 and UTC.
- custom
Properties Map<String,String> - A list of key value pair of properties that will be used.
- description String
- A human-friendly description.
- external
Region StringId - The id of the region for which this zone is defined.
- folder String
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id String
- links
List<Get
Zone Link> - HATEOAS of the entity.
- name String
- org
Id String - The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- placement
Policy String - The placement policy for the zone. One of
DEFAULT
,SPREAD
orBINPACK
. - updated
At String - Date when the entity was last updated. The date is ISO 8601 and UTC.
- List<Get
Zone Tag> - A set of tag keys and optional values that were set on this resource:
- List<Get
Zone Tags To Match> - A set of tag keys and optional values for compute resource filtering:
- cloud
Account stringId - The ID of the cloud account this zone belongs to.
- compute
Ids string[] - The ids of the compute resources that has been explicitly assigned to this zone.
- created
At string - Date when the entity was created. The date is in ISO 8601 and UTC.
- custom
Properties {[key: string]: string} - A list of key value pair of properties that will be used.
- description string
- A human-friendly description.
- external
Region stringId - The id of the region for which this zone is defined.
- folder string
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id string
- links
Get
Zone Link[] - HATEOAS of the entity.
- name string
- org
Id string - The id of the organization this entity belongs to.
- owner string
- Email of the user that owns the entity.
- placement
Policy string - The placement policy for the zone. One of
DEFAULT
,SPREAD
orBINPACK
. - updated
At string - Date when the entity was last updated. The date is ISO 8601 and UTC.
- Get
Zone Tag[] - A set of tag keys and optional values that were set on this resource:
- Get
Zone Tags To Match[] - A set of tag keys and optional values for compute resource filtering:
- cloud_
account_ strid - The ID of the cloud account this zone belongs to.
- compute_
ids Sequence[str] - The ids of the compute resources that has been explicitly assigned to this zone.
- created_
at str - Date when the entity was created. The date is in ISO 8601 and UTC.
- custom_
properties Mapping[str, str] - A list of key value pair of properties that will be used.
- description str
- A human-friendly description.
- external_
region_ strid - The id of the region for which this zone is defined.
- folder str
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id str
- links
Sequence[Get
Zone Link] - HATEOAS of the entity.
- name str
- org_
id str - The id of the organization this entity belongs to.
- owner str
- Email of the user that owns the entity.
- placement_
policy str - The placement policy for the zone. One of
DEFAULT
,SPREAD
orBINPACK
. - updated_
at str - Date when the entity was last updated. The date is ISO 8601 and UTC.
- Sequence[Get
Zone Tag] - A set of tag keys and optional values that were set on this resource:
- Sequence[Get
Zone Tags To Match] - A set of tag keys and optional values for compute resource filtering:
- cloud
Account StringId - The ID of the cloud account this zone belongs to.
- compute
Ids List<String> - The ids of the compute resources that has been explicitly assigned to this zone.
- created
At String - Date when the entity was created. The date is in ISO 8601 and UTC.
- custom
Properties Map<String> - A list of key value pair of properties that will be used.
- description String
- A human-friendly description.
- external
Region StringId - The id of the region for which this zone is defined.
- folder String
- The folder relative path to the datacenter where resources are deployed to (only applicable for vSphere cloud zones).
- id String
- links List<Property Map>
- HATEOAS of the entity.
- name String
- org
Id String - The id of the organization this entity belongs to.
- owner String
- Email of the user that owns the entity.
- placement
Policy String - The placement policy for the zone. One of
DEFAULT
,SPREAD
orBINPACK
. - updated
At String - Date when the entity was last updated. The date is ISO 8601 and UTC.
- List<Property Map>
- A set of tag keys and optional values that were set on this resource:
- List<Property Map>
- A set of tag keys and optional values for compute resource filtering:
Supporting Types
GetZoneLink
GetZoneTag
GetZoneTagsToMatch
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the
vra
Terraform Provider.