text: # 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__ = [
      'GetOpenSearchAclRuleResult',
      'AwaitableGetOpenSearchAclRuleResult',
      'get_open_search_acl_rule',
  ]
  
  @pulumi.output_type
  class GetOpenSearchAclRuleResult:
      """
      A collection of values returned by getOpenSearchAclRule.
      """
      def __init__(__self__, id=None, index=None, permission=None, project=None, service_name=None, username=None):
          if id and not isinstance(id, str):
              raise TypeError("Expected argument 'id' to be a str")
          pulumi.set(__self__, "id", id)
          if index and not isinstance(index, str):
              raise TypeError("Expected argument 'index' to be a str")
          pulumi.set(__self__, "index", index)
          if permission and not isinstance(permission, str):
              raise TypeError("Expected argument 'permission' to be a str")
          pulumi.set(__self__, "permission", permission)
          if project and not isinstance(project, str):
              raise TypeError("Expected argument 'project' to be a str")
          pulumi.set(__self__, "project", project)
          if service_name and not isinstance(service_name, str):
              raise TypeError("Expected argument 'service_name' to be a str")
          pulumi.set(__self__, "service_name", service_name)
          if username and not isinstance(username, str):
              raise TypeError("Expected argument 'username' to be a str")
          pulumi.set(__self__, "username", username)
  
      @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 index(self) -> str:
          return pulumi.get(self, "index")
  
      @property
      @pulumi.getter
      def permission(self) -> str:
          return pulumi.get(self, "permission")
  
      @property
      @pulumi.getter
      def project(self) -> str:
          return pulumi.get(self, "project")
  
      @property
      @pulumi.getter(name="serviceName")
      def service_name(self) -> str:
          return pulumi.get(self, "service_name")
  
      @property
      @pulumi.getter
      def username(self) -> str:
          return pulumi.get(self, "username")
  
  
  class AwaitableGetOpenSearchAclRuleResult(GetOpenSearchAclRuleResult):
      # pylint: disable=using-constant-test
      def __await__(self):
          if False:
              yield self
          return GetOpenSearchAclRuleResult(
              id=self.id,
              index=self.index,
              permission=self.permission,
              project=self.project,
              service_name=self.service_name,
              username=self.username)
  
  
  def get_open_search_acl_rule(index: Optional[str] = None,
                               permission: Optional[str] = None,
                               project: Optional[str] = None,
                               service_name: Optional[str] = None,
                               username: Optional[str] = None,
                               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOpenSearchAclRuleResult:
      """
      Use this data source to access information about an existing resource.
      """
      __args__ = dict()
      __args__['index'] = index
      __args__['permission'] = permission
      __args__['project'] = project
      __args__['serviceName'] = service_name
      __args__['username'] = username
      if opts is None:
          opts = pulumi.InvokeOptions()
      if opts.version is None:
          opts.version = _utilities.get_version()
      __ret__ = pulumi.runtime.invoke('aiven:index/getOpenSearchAclRule:getOpenSearchAclRule', __args__, opts=opts, typ=GetOpenSearchAclRuleResult).value
  
      return AwaitableGetOpenSearchAclRuleResult(
          id=__ret__.id,
          index=__ret__.index,
          permission=__ret__.permission,
          project=__ret__.project,
          service_name=__ret__.service_name,
          username=__ret__.username)
  