# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetMwsCredentialsResult',
    'AwaitableGetMwsCredentialsResult',
    'get_mws_credentials',
    'get_mws_credentials_output',
]

@pulumi.output_type
class GetMwsCredentialsResult:
    """
    A collection of values returned by getMwsCredentials.
    """
    def __init__(__self__, id=None, ids=None, provider_config=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ids and not isinstance(ids, dict):
            raise TypeError("Expected argument 'ids' to be a dict")
        pulumi.set(__self__, "ids", ids)
        if provider_config and not isinstance(provider_config, dict):
            raise TypeError("Expected argument 'provider_config' to be a dict")
        pulumi.set(__self__, "provider_config", provider_config)

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def ids(self) -> Mapping[str, _builtins.str]:
        """
        name-to-id map for all of the credentials in the account
        """
        return pulumi.get(self, "ids")

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional['outputs.GetMwsCredentialsProviderConfigResult']:
        return pulumi.get(self, "provider_config")


class AwaitableGetMwsCredentialsResult(GetMwsCredentialsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetMwsCredentialsResult(
            id=self.id,
            ids=self.ids,
            provider_config=self.provider_config)


def get_mws_credentials(ids: Optional[Mapping[str, _builtins.str]] = None,
                        provider_config: Optional[Union['GetMwsCredentialsProviderConfigArgs', 'GetMwsCredentialsProviderConfigArgsDict']] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMwsCredentialsResult:
    """
    Lists all MwsCredentials in Databricks Account.

    > This data source can only be used with an account-level provider!

    ## Example Usage

    Listing all credentials in Databricks Account

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all = databricks.get_mws_credentials()
    pulumi.export("allMwsCredentials", all.ids)
    ```

    ## Related Resources

    The following resources are used in the same context:

    * Provisioning Databricks on AWS guide.
    * MwsCustomerManagedKeys to configure KMS keys for new workspaces within AWS.
    * MwsLogDelivery to configure delivery of [billable usage logs](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html) and [audit logs](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html).
    * MwsNetworks to [configure VPC](https://docs.databricks.com/administration-guide/cloud-configurations/aws/customer-managed-vpc.html) & subnets for new workspaces within AWS.
    * MwsStorageConfigurations to configure root bucket new workspaces within AWS.
    * MwsWorkspaces to set up [AWS and GCP workspaces](https://docs.databricks.com/getting-started/overview.html#e2-architecture-1).


    :param Mapping[str, _builtins.str] ids: name-to-id map for all of the credentials in the account
    :param Union['GetMwsCredentialsProviderConfigArgs', 'GetMwsCredentialsProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
    """
    __args__ = dict()
    __args__['ids'] = ids
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getMwsCredentials:getMwsCredentials', __args__, opts=opts, typ=GetMwsCredentialsResult).value

    return AwaitableGetMwsCredentialsResult(
        id=pulumi.get(__ret__, 'id'),
        ids=pulumi.get(__ret__, 'ids'),
        provider_config=pulumi.get(__ret__, 'provider_config'))
def get_mws_credentials_output(ids: Optional[pulumi.Input[Optional[Mapping[str, _builtins.str]]]] = None,
                               provider_config: Optional[pulumi.Input[Optional[Union['GetMwsCredentialsProviderConfigArgs', 'GetMwsCredentialsProviderConfigArgsDict']]]] = None,
                               opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetMwsCredentialsResult]:
    """
    Lists all MwsCredentials in Databricks Account.

    > This data source can only be used with an account-level provider!

    ## Example Usage

    Listing all credentials in Databricks Account

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all = databricks.get_mws_credentials()
    pulumi.export("allMwsCredentials", all.ids)
    ```

    ## Related Resources

    The following resources are used in the same context:

    * Provisioning Databricks on AWS guide.
    * MwsCustomerManagedKeys to configure KMS keys for new workspaces within AWS.
    * MwsLogDelivery to configure delivery of [billable usage logs](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html) and [audit logs](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html).
    * MwsNetworks to [configure VPC](https://docs.databricks.com/administration-guide/cloud-configurations/aws/customer-managed-vpc.html) & subnets for new workspaces within AWS.
    * MwsStorageConfigurations to configure root bucket new workspaces within AWS.
    * MwsWorkspaces to set up [AWS and GCP workspaces](https://docs.databricks.com/getting-started/overview.html#e2-architecture-1).


    :param Mapping[str, _builtins.str] ids: name-to-id map for all of the credentials in the account
    :param Union['GetMwsCredentialsProviderConfigArgs', 'GetMwsCredentialsProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
    """
    __args__ = dict()
    __args__['ids'] = ids
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getMwsCredentials:getMwsCredentials', __args__, opts=opts, typ=GetMwsCredentialsResult)
    return __ret__.apply(lambda __response__: GetMwsCredentialsResult(
        id=pulumi.get(__response__, 'id'),
        ids=pulumi.get(__response__, 'ids'),
        provider_config=pulumi.get(__response__, 'provider_config')))
