1. Packages
  2. Vra Provider
  3. API Docs
  4. getZone
vra 0.12.0 published on Monday, Apr 14, 2025 by vmware

vra.getZone

Explore with Pulumi AI

vra logo
vra 0.12.0 published on Monday, Apr 14, 2025 by vmware

    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.
    Tags List<GetZoneTag>
    A set of tag keys and optional values that were set on this resource:
    TagsToMatches List<GetZoneTagsToMatch>
    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.
    Tags []GetZoneTag
    A set of tag keys and optional values that were set on this resource:
    TagsToMatches []GetZoneTagsToMatch
    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.
    tags List<GetZoneTag>
    A set of tag keys and optional values that were set on this resource:
    tagsToMatches List<GetZoneTagsToMatch>
    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.
    tags GetZoneTag[]
    A set of tag keys and optional values that were set on this resource:
    tagsToMatches GetZoneTagsToMatch[]
    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.
    tags Sequence[GetZoneTag]
    A set of tag keys and optional values that were set on this resource:
    tags_to_matches Sequence[GetZoneTagsToMatch]
    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.
    tags List<Property Map>
    A set of tag keys and optional values that were set on this resource:
    tagsToMatches List<Property Map>
    A set of tag keys and optional values for compute resource filtering:

    getZone Result

    The following output properties are available:

    CloudAccountId string
    The ID of the cloud account this zone belongs to.
    ComputeIds List<string>
    The ids of the compute resources that has been explicitly assigned to this zone.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CustomProperties Dictionary<string, string>
    A list of key value pair of properties that will be used.
    Description string
    A human-friendly description.
    ExternalRegionId string
    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<GetZoneLink>
    HATEOAS of the entity.
    Name string
    OrgId string
    The id of the organization this entity belongs to.
    Owner string
    Email of the user that owns the entity.
    PlacementPolicy string
    The placement policy for the zone. One of DEFAULT, SPREAD or BINPACK.
    UpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    Tags List<GetZoneTag>
    A set of tag keys and optional values that were set on this resource:
    TagsToMatches List<GetZoneTagsToMatch>
    A set of tag keys and optional values for compute resource filtering:
    CloudAccountId string
    The ID of the cloud account this zone belongs to.
    ComputeIds []string
    The ids of the compute resources that has been explicitly assigned to this zone.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CustomProperties map[string]string
    A list of key value pair of properties that will be used.
    Description string
    A human-friendly description.
    ExternalRegionId string
    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 []GetZoneLink
    HATEOAS of the entity.
    Name string
    OrgId string
    The id of the organization this entity belongs to.
    Owner string
    Email of the user that owns the entity.
    PlacementPolicy string
    The placement policy for the zone. One of DEFAULT, SPREAD or BINPACK.
    UpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    Tags []GetZoneTag
    A set of tag keys and optional values that were set on this resource:
    TagsToMatches []GetZoneTagsToMatch
    A set of tag keys and optional values for compute resource filtering:
    cloudAccountId String
    The ID of the cloud account this zone belongs to.
    computeIds List<String>
    The ids of the compute resources that has been explicitly assigned to this zone.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    customProperties Map<String,String>
    A list of key value pair of properties that will be used.
    description String
    A human-friendly description.
    externalRegionId String
    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<GetZoneLink>
    HATEOAS of the entity.
    name String
    orgId String
    The id of the organization this entity belongs to.
    owner String
    Email of the user that owns the entity.
    placementPolicy String
    The placement policy for the zone. One of DEFAULT, SPREAD or BINPACK.
    updatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    tags List<GetZoneTag>
    A set of tag keys and optional values that were set on this resource:
    tagsToMatches List<GetZoneTagsToMatch>
    A set of tag keys and optional values for compute resource filtering:
    cloudAccountId string
    The ID of the cloud account this zone belongs to.
    computeIds string[]
    The ids of the compute resources that has been explicitly assigned to this zone.
    createdAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    customProperties {[key: string]: string}
    A list of key value pair of properties that will be used.
    description string
    A human-friendly description.
    externalRegionId string
    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 GetZoneLink[]
    HATEOAS of the entity.
    name string
    orgId string
    The id of the organization this entity belongs to.
    owner string
    Email of the user that owns the entity.
    placementPolicy string
    The placement policy for the zone. One of DEFAULT, SPREAD or BINPACK.
    updatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    tags GetZoneTag[]
    A set of tag keys and optional values that were set on this resource:
    tagsToMatches GetZoneTagsToMatch[]
    A set of tag keys and optional values for compute resource filtering:
    cloud_account_id str
    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_id str
    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[GetZoneLink]
    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 or BINPACK.
    updated_at str
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    tags Sequence[GetZoneTag]
    A set of tag keys and optional values that were set on this resource:
    tags_to_matches Sequence[GetZoneTagsToMatch]
    A set of tag keys and optional values for compute resource filtering:
    cloudAccountId String
    The ID of the cloud account this zone belongs to.
    computeIds List<String>
    The ids of the compute resources that has been explicitly assigned to this zone.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    customProperties Map<String>
    A list of key value pair of properties that will be used.
    description String
    A human-friendly description.
    externalRegionId String
    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
    orgId String
    The id of the organization this entity belongs to.
    owner String
    Email of the user that owns the entity.
    placementPolicy String
    The placement policy for the zone. One of DEFAULT, SPREAD or BINPACK.
    updatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    tags List<Property Map>
    A set of tag keys and optional values that were set on this resource:
    tagsToMatches List<Property Map>
    A set of tag keys and optional values for compute resource filtering:

    Supporting Types

    Href string
    Hrefs List<string>
    Rel string
    Href string
    Hrefs []string
    Rel string
    href String
    hrefs List<String>
    rel String
    href string
    hrefs string[]
    rel string
    href str
    hrefs Sequence[str]
    rel str
    href String
    hrefs List<String>
    rel String

    GetZoneTag

    Key string
    Tag’s key.
    Value string
    Tag’s value.
    Key string
    Tag’s key.
    Value string
    Tag’s value.
    key String
    Tag’s key.
    value String
    Tag’s value.
    key string
    Tag’s key.
    value string
    Tag’s value.
    key str
    Tag’s key.
    value str
    Tag’s value.
    key String
    Tag’s key.
    value String
    Tag’s value.

    GetZoneTagsToMatch

    Key string
    Tag’s key.
    Value string
    Tag’s value.
    Key string
    Tag’s key.
    Value string
    Tag’s value.
    key String
    Tag’s key.
    value String
    Tag’s value.
    key string
    Tag’s key.
    value string
    Tag’s value.
    key str
    Tag’s key.
    value str
    Tag’s value.
    key String
    Tag’s key.
    value String
    Tag’s value.

    Package Details

    Repository
    vra vmware/terraform-provider-vra
    License
    Notes
    This Pulumi package is based on the vra Terraform Provider.
    vra logo
    vra 0.12.0 published on Monday, Apr 14, 2025 by vmware