> ## 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.

# alterEnvironment

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

  <h2 className="memtitle"><span className="permalink"><a href="#a7ad22467beee2568754047af78a7bf90">◆ </a></span>alterEnvironment() <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_1AlterEnvironmentResponse">AlterEnvironmentResponse</a> gpudb::GPUdb::alterEnvironment </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1AlterEnvironmentRequest">AlterEnvironmentRequest</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>Alters an existing environment which can be referenced by a <a href="/content/concepts/udf/" target="_top">user-defined function</a> (UDF). </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_1AlterEnvironmentRequest">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_1AlterEnvironmentResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="ae4f9b2cdbdf0fb844a552aa6844af675" />

  <h2 className="memtitle"><span className="permalink"><a href="#ae4f9b2cdbdf0fb844a552aa6844af675">◆ </a></span>alterEnvironment() <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_1AlterEnvironmentResponse">AlterEnvironmentResponse</a> & gpudb::GPUdb::alterEnvironment </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1AlterEnvironmentRequest">AlterEnvironmentRequest</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_1AlterEnvironmentResponse">AlterEnvironmentResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Alters an existing environment which can be referenced by a <a href="/content/concepts/udf/" target="_top">user-defined function</a> (UDF). </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_1AlterEnvironmentRequest">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_1AlterEnvironmentResponse">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_1AlterEnvironmentResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a908327f53abc3d0337024fa7adca1f77" />

  <h2 className="memtitle"><span className="permalink"><a href="#a908327f53abc3d0337024fa7adca1f77">◆ </a></span>alterEnvironment() <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_1AlterEnvironmentResponse">AlterEnvironmentResponse</a> gpudb::GPUdb::alterEnvironment </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">environmentName</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">action</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">value</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>Alters an existing environment which can be referenced by a <a href="/content/concepts/udf/" target="_top">user-defined function</a> (UDF). </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">environmentName</td>
              <td>Name of the environment to be altered. </td>
            </tr>

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

              <td>
                Modification operation to be applied. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab0796383a257147cadaef815fc59da5c">alter\_environment\_install\_package</a>: Install a python package from PyPI, an external data source or KiFS. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a87496b3c47fbc0c828b37f727bc2197c">alter\_environment\_install\_requirements</a>: Install packages from a requirements file. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac46962a17b1b9340f6a8d39e79c04544">alter\_environment\_uninstall\_package</a>: Uninstall a python package. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#adf6ca34b954ccde01c5fbbccf6c30678">alter\_environment\_uninstall\_requirements</a>: Uninstall packages from a requirements file. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac99f67abc4aadaf8b73ffff173a6c5b1">alter\_environment\_reset</a>: Uninstalls all packages in the environment and resets it to the original state at time of creation. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#afe2895fb56b140a32ce6660f3c6108a6">alter\_environment\_rebuild</a>: Recreates the environment and re-installs all packages, upgrades the packages if necessary based on dependencies. </li>
                </ul>
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">value</td>
              <td>The value of the modification, depending on <span className="em arg">action</span>. For example, if <span className="em arg">action</span> is <a className="el" href="/content/api/cpp/namespacegpudb#ab0796383a257147cadaef815fc59da5c">install\_package</a>, this would be the python package name. If <span className="em arg">action</span> is <a className="el" href="/content/api/cpp/namespacegpudb#a87496b3c47fbc0c828b37f727bc2197c">install\_requirements</a>, this would be the path of a requirements file from which to install packages. If an external data source is specified in <a className="el" href="/content/api/cpp/namespacegpudb#aac83bd2736cec62f9efbbea87fdfbe86">datasource\_name</a>, this can be the path to a wheel file or source archive. Alternatively, if installing from a file (wheel or source archive), the value may be a reference to a file in <a href="/content/tools/kifs/" target="_top">KiFS</a>. </td>
            </tr>

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

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aac83bd2736cec62f9efbbea87fdfbe86">alter\_environment\_datasource\_name</a>: Name of an existing external data source from which packages specified in <span className="em arg">value</span> can be loaded. </li>
                </ul>

                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_1AlterEnvironmentResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a27395e3418456675335c8547725fe5af" />

  <h2 className="memtitle"><span className="permalink"><a href="#a27395e3418456675335c8547725fe5af">◆ </a></span>alterEnvironment() <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_1AlterEnvironmentResponse">AlterEnvironmentResponse</a> & gpudb::GPUdb::alterEnvironment </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">environmentName</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">action</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">value</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_1AlterEnvironmentResponse">AlterEnvironmentResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Alters an existing environment which can be referenced by a <a href="/content/concepts/udf/" target="_top">user-defined function</a> (UDF). </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">environmentName</td>
              <td>Name of the environment to be altered. </td>
            </tr>

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

              <td>
                Modification operation to be applied. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab0796383a257147cadaef815fc59da5c">alter\_environment\_install\_package</a>: Install a python package from PyPI, an external data source or KiFS. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a87496b3c47fbc0c828b37f727bc2197c">alter\_environment\_install\_requirements</a>: Install packages from a requirements file. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac46962a17b1b9340f6a8d39e79c04544">alter\_environment\_uninstall\_package</a>: Uninstall a python package. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#adf6ca34b954ccde01c5fbbccf6c30678">alter\_environment\_uninstall\_requirements</a>: Uninstall packages from a requirements file. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac99f67abc4aadaf8b73ffff173a6c5b1">alter\_environment\_reset</a>: Uninstalls all packages in the environment and resets it to the original state at time of creation. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#afe2895fb56b140a32ce6660f3c6108a6">alter\_environment\_rebuild</a>: Recreates the environment and re-installs all packages, upgrades the packages if necessary based on dependencies. </li>
                </ul>
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">value</td>
              <td>The value of the modification, depending on <span className="em arg">action</span>. For example, if <span className="em arg">action</span> is <a className="el" href="/content/api/cpp/namespacegpudb#ab0796383a257147cadaef815fc59da5c">install\_package</a>, this would be the python package name. If <span className="em arg">action</span> is <a className="el" href="/content/api/cpp/namespacegpudb#a87496b3c47fbc0c828b37f727bc2197c">install\_requirements</a>, this would be the path of a requirements file from which to install packages. If an external data source is specified in <a className="el" href="/content/api/cpp/namespacegpudb#aac83bd2736cec62f9efbbea87fdfbe86">datasource\_name</a>, this can be the path to a wheel file or source archive. Alternatively, if installing from a file (wheel or source archive), the value may be a reference to a file in <a href="/content/tools/kifs/" target="_top">KiFS</a>. </td>
            </tr>

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

              <td>
                Optional parameters.

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#aac83bd2736cec62f9efbbea87fdfbe86">alter\_environment\_datasource\_name</a>: Name of an existing external data source from which packages specified in <span className="em arg">value</span> can be loaded. </li>
                </ul>

                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_1AlterEnvironmentResponse">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_1AlterEnvironmentResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
