# 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__ = [
    'GetZonesResult',
    'AwaitableGetZonesResult',
    'get_zones',
    'get_zones_output',
]

@pulumi.output_type
class GetZonesResult:
    """
    A collection of values returned by getZones.
    """
    def __init__(__self__, default_zone=None, id=None, zones=None):
        if default_zone and not isinstance(default_zone, str):
            raise TypeError("Expected argument 'default_zone' to be a str")
        pulumi.set(__self__, "default_zone", default_zone)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if zones and not isinstance(zones, list):
            raise TypeError("Expected argument 'zones' to be a list")
        pulumi.set(__self__, "zones", zones)

    @property
    @pulumi.getter(name="defaultZone")
    def default_zone(self) -> str:
        """
        This is the default zone that gets assigned to your workspace. This is the zone used by default for clusters and instance pools.
        """
        return pulumi.get(self, "default_zone")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The id for the zone object.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def zones(self) -> Sequence[str]:
        """
        This is a list of all the zones available for your subnets in your Databricks workspace.
        """
        return pulumi.get(self, "zones")


class AwaitableGetZonesResult(GetZonesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetZonesResult(
            default_zone=self.default_zone,
            id=self.id,
            zones=self.zones)


def get_zones(default_zone: Optional[str] = None,
              id: Optional[str] = None,
              zones: Optional[Sequence[str]] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetZonesResult:
    """
    > **Note** If you have a fully automated setup with workspaces created by databricks_mws_workspaces, please make sure to add depends_on attribute in order to prevent _default auth: cannot configure default credentials_ errors.

    This data source allows you to fetch all available AWS availability zones on your workspace on AWS.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_databricks as databricks

    zones = databricks.get_zones()
    ```


    :param str default_zone: This is the default zone that gets assigned to your workspace. This is the zone used by default for clusters and instance pools.
    :param str id: The id for the zone object.
    :param Sequence[str] zones: This is a list of all the zones available for your subnets in your Databricks workspace.
    """
    __args__ = dict()
    __args__['defaultZone'] = default_zone
    __args__['id'] = id
    __args__['zones'] = zones
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getZones:getZones', __args__, opts=opts, typ=GetZonesResult).value

    return AwaitableGetZonesResult(
        default_zone=pulumi.get(__ret__, 'default_zone'),
        id=pulumi.get(__ret__, 'id'),
        zones=pulumi.get(__ret__, 'zones'))


@_utilities.lift_output_func(get_zones)
def get_zones_output(default_zone: Optional[pulumi.Input[Optional[str]]] = None,
                     id: Optional[pulumi.Input[Optional[str]]] = None,
                     zones: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetZonesResult]:
    """
    > **Note** If you have a fully automated setup with workspaces created by databricks_mws_workspaces, please make sure to add depends_on attribute in order to prevent _default auth: cannot configure default credentials_ errors.

    This data source allows you to fetch all available AWS availability zones on your workspace on AWS.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_databricks as databricks

    zones = databricks.get_zones()
    ```


    :param str default_zone: This is the default zone that gets assigned to your workspace. This is the zone used by default for clusters and instance pools.
    :param str id: The id for the zone object.
    :param Sequence[str] zones: This is a list of all the zones available for your subnets in your Databricks workspace.
    """
    ...
