# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetRegionResult',
    'AwaitableGetRegionResult',
    'get_region',
    'get_region_output',
]

@pulumi.output_type
class GetRegionResult:
    """
    A collection of values returned by getRegion.
    """
    def __init__(__self__, cloud_account_id=None, created_at=None, external_region_id=None, filter=None, id=None, name=None, org_id=None, owner=None, region=None, updated_at=None):
        if cloud_account_id and not isinstance(cloud_account_id, str):
            raise TypeError("Expected argument 'cloud_account_id' to be a str")
        pulumi.set(__self__, "cloud_account_id", cloud_account_id)
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if external_region_id and not isinstance(external_region_id, str):
            raise TypeError("Expected argument 'external_region_id' to be a str")
        pulumi.set(__self__, "external_region_id", external_region_id)
        if filter and not isinstance(filter, str):
            raise TypeError("Expected argument 'filter' to be a str")
        pulumi.set(__self__, "filter", filter)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if org_id and not isinstance(org_id, str):
            raise TypeError("Expected argument 'org_id' to be a str")
        pulumi.set(__self__, "org_id", org_id)
        if owner and not isinstance(owner, str):
            raise TypeError("Expected argument 'owner' to be a str")
        pulumi.set(__self__, "owner", owner)
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        pulumi.set(__self__, "region", region)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)

    @property
    @pulumi.getter(name="cloudAccountId")
    def cloud_account_id(self) -> str:
        return pulumi.get(self, "cloud_account_id")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        Date when the entity was created. The date is in ISO 8601 and UTC.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="externalRegionId")
    def external_region_id(self) -> str:
        """
        Unique identifier of region on the provider side.
        """
        return pulumi.get(self, "external_region_id")

    @property
    @pulumi.getter
    def filter(self) -> Optional[str]:
        return pulumi.get(self, "filter")

    @property
    @pulumi.getter
    def id(self) -> str:
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        Name of region on the provider side. In vSphere, the name of the region is different from its id.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> str:
        """
        The id of the organization this entity belongs to.
        """
        return pulumi.get(self, "org_id")

    @property
    @pulumi.getter
    def owner(self) -> str:
        """
        Email of the user that owns the entity.
        """
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter
    def region(self) -> Optional[str]:
        return pulumi.get(self, "region")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> str:
        """
        Date when the entity was last updated. The date is ISO 8601 and UTC.
        """
        return pulumi.get(self, "updated_at")


class AwaitableGetRegionResult(GetRegionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRegionResult(
            cloud_account_id=self.cloud_account_id,
            created_at=self.created_at,
            external_region_id=self.external_region_id,
            filter=self.filter,
            id=self.id,
            name=self.name,
            org_id=self.org_id,
            owner=self.owner,
            region=self.region,
            updated_at=self.updated_at)


def get_region(cloud_account_id: Optional[str] = None,
               filter: Optional[str] = None,
               id: Optional[str] = None,
               region: Optional[str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRegionResult:
    """
    This is an example of how to lookup a region data source:

    **Region data source by id:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.region.get_region(id=var["vra_region_id"])
    ```

    **Region data source by filter:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.region.get_region(filter=f"name eq '{var['vra_region_name']}'")
    ```

    **Region data source by cloud account id and region:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.region.get_region(cloud_account_id=var["vra_cloud_account_id"],
        region=var["vra_region_external_id"])
    ```


    :param str cloud_account_id: The id of the cloud account the region belongs to.
    :param str filter: Search criteria to narrow down Regions.
    :param str id: The id of the region instance.
    :param str region: The specific region associated with the cloud account. On vSphere, this is the external ID.
    """
    __args__ = dict()
    __args__['cloudAccountId'] = cloud_account_id
    __args__['filter'] = filter
    __args__['id'] = id
    __args__['region'] = region
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:region/getRegion:getRegion', __args__, opts=opts, typ=GetRegionResult).value

    return AwaitableGetRegionResult(
        cloud_account_id=__ret__.cloud_account_id,
        created_at=__ret__.created_at,
        external_region_id=__ret__.external_region_id,
        filter=__ret__.filter,
        id=__ret__.id,
        name=__ret__.name,
        org_id=__ret__.org_id,
        owner=__ret__.owner,
        region=__ret__.region,
        updated_at=__ret__.updated_at)


@_utilities.lift_output_func(get_region)
def get_region_output(cloud_account_id: Optional[pulumi.Input[Optional[str]]] = None,
                      filter: Optional[pulumi.Input[Optional[str]]] = None,
                      id: Optional[pulumi.Input[Optional[str]]] = None,
                      region: Optional[pulumi.Input[Optional[str]]] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRegionResult]:
    """
    This is an example of how to lookup a region data source:

    **Region data source by id:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.region.get_region(id=var["vra_region_id"])
    ```

    **Region data source by filter:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.region.get_region(filter=f"name eq '{var['vra_region_name']}'")
    ```

    **Region data source by cloud account id and region:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.region.get_region(cloud_account_id=var["vra_cloud_account_id"],
        region=var["vra_region_external_id"])
    ```


    :param str cloud_account_id: The id of the cloud account the region belongs to.
    :param str filter: Search criteria to narrow down Regions.
    :param str id: The id of the region instance.
    :param str region: The specific region associated with the cloud account. On vSphere, this is the external ID.
    """
    ...
