# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetAwsCrossAccountPolicyResult',
    'AwaitableGetAwsCrossAccountPolicyResult',
    'get_aws_cross_account_policy',
]

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

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

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

    @property
    @pulumi.getter(name="passRoles")
    def pass_roles(self) -> Optional[Sequence[str]]:
        return pulumi.get(self, "pass_roles")


class AwaitableGetAwsCrossAccountPolicyResult(GetAwsCrossAccountPolicyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAwsCrossAccountPolicyResult(
            id=self.id,
            json=self.json,
            pass_roles=self.pass_roles)


def get_aws_cross_account_policy(pass_roles: Optional[Sequence[str]] = None,
                                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAwsCrossAccountPolicyResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['passRoles'] = pass_roles
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('databricks:databricks/getAwsCrossAccountPolicy:getAwsCrossAccountPolicy', __args__, opts=opts, typ=GetAwsCrossAccountPolicyResult).value

    return AwaitableGetAwsCrossAccountPolicyResult(
        id=__ret__.id,
        json=__ret__.json,
        pass_roles=__ret__.pass_roles)
