> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# grantPermissionDatasource

<div className="kinetica-doxygen">
  <div id="a5ea6ea4a2af4895f3acf2131ffe36c56" />

  <h2 className="memtitle"><span className="permalink"><a href="#a5ea6ea4a2af4895f3acf2131ffe36c56">◆ </a></span>grantPermissionDatasource() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">GrantPermissionDatasourceResponse</a> gpudb::GPUdb::grantPermissionDatasource </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceRequest">GrantPermissionDatasourceRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>\[DEPRECATED–please use <a className="el" href="#a9634c497d7035ee98062b6f92a63be8d">grantPermission</a> instead] Grants a <a href="/content/concepts/data_sources/" target="_top">data source</a> permission to a user or role. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a427ec3b80a4def2161784aa9e7371b00" />

  <h2 className="memtitle"><span className="permalink"><a href="#a427ec3b80a4def2161784aa9e7371b00">◆ </a></span>grantPermissionDatasource() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">GrantPermissionDatasourceResponse</a> & gpudb::GPUdb::grantPermissionDatasource </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceRequest">GrantPermissionDatasourceRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">GrantPermissionDatasourceResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>\[DEPRECATED–please use <a className="el" href="#a9634c497d7035ee98062b6f92a63be8d">grantPermission</a> instead] Grants a <a href="/content/concepts/data_sources/" target="_top">data source</a> permission to a user or role. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="ab404e2c7c283594278c84d22832ccfaf" />

  <h2 className="memtitle"><span className="permalink"><a href="#ab404e2c7c283594278c84d22832ccfaf">◆ </a></span>grantPermissionDatasource() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">GrantPermissionDatasourceResponse</a> gpudb::GPUdb::grantPermissionDatasource </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">name</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">permission</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">datasourceName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>\[DEPRECATED–please use <a className="el" href="#ad2439e67beadacbe234814ad9c4e4691">grantPermission</a> instead] Grants a <a href="/content/concepts/data_sources/" target="_top">data source</a> permission to a user or role. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">name</td>
              <td>Name of the user or role to which the permission will be granted. Must be an existing user or role. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">permission</td>

              <td>
                Permission to grant to the user or role. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7537475c56ceaa2d2583ba633210c191">grant\_permission\_datasource\_admin</a>: Admin access on the given data source. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ae657f681c0269d80d72dd986106ccf28">grant\_permission\_datasource\_connect</a>: Connect access on the given data source. </li>
                </ul>
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">datasourceName</td>
              <td>Name of the data source on which the permission will be granted. Must be an existing data source, or an empty string to grant permission on all data sources. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>
              <td>Optional parameters. The default value is an empty map.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a131e77dc89bc9cebcb915c8b04e873eb" />

  <h2 className="memtitle"><span className="permalink"><a href="#a131e77dc89bc9cebcb915c8b04e873eb">◆ </a></span>grantPermissionDatasource() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">GrantPermissionDatasourceResponse</a> & gpudb::GPUdb::grantPermissionDatasource </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">name</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">permission</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">datasourceName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">GrantPermissionDatasourceResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>\[DEPRECATED–please use <a className="el" href="#ad2439e67beadacbe234814ad9c4e4691">grantPermission</a> instead] Grants a <a href="/content/concepts/data_sources/" target="_top">data source</a> permission to a user or role. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">name</td>
              <td>Name of the user or role to which the permission will be granted. Must be an existing user or role. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">permission</td>

              <td>
                Permission to grant to the user or role. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a7537475c56ceaa2d2583ba633210c191">grant\_permission\_datasource\_admin</a>: Admin access on the given data source. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ae657f681c0269d80d72dd986106ccf28">grant\_permission\_datasource\_connect</a>: Connect access on the given data source. </li>
                </ul>
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">datasourceName</td>
              <td>Name of the data source on which the permission will be granted. Must be an existing data source, or an empty string to grant permission on all data sources. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>
              <td>Optional parameters. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1GrantPermissionDatasourceResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
