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

# alter_environment

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_environment.rs#L32-L45)
pub async fn [alter\_environment](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-environment.md#method.alter_environment)( \&self, environment\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), action: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), value: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterEnvironmentResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Alter an existing UDF environmentAlters an existing environment which can be referenced by a user-defined function (UDF).

##### Arguments

<ul>
  <li>
    `environment_name` - Name of the environment to be altered.
  </li>

  <li>
    `action` - Modification operation to be applied.
  </li>

  <li>
    `value` - The value of the modification, depending on `action`. For example, if `action` is install\_package, this would be the python package name.If `action` is install\_requirements, this would be the path of a requirements file from which to install packages.If an external data source is specified in datasource\_name, 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 KiFS.
  </li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_environment.rs#L69-L89)
pub async fn [alter\_environment\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-environment.md#method.alter_environment_with_opts)( \&self, environment\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), action: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), value: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), options: [AlterEnvironmentRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterEnvironmentResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Alter an existing UDF environmentAlters an existing environment which can be referenced by a user-defined function (UDF).

##### Arguments

<ul>
  <li>
    `environment_name` - Name of the environment to be altered.
  </li>

  <li>
    `action` - Modification operation to be applied.
  </li>

  <li>
    `value` - The value of the modification, depending on `action`. For example, if `action` is install\_package, this would be the python package name.If `action` is install\_requirements, this would be the path of a requirements file from which to install packages.If an external data source is specified in datasource\_name, 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 KiFS.
  </li>

  <li>
    `options` - The optional parameters; any left unset take the server’s defaults.
  </li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_environment.rs#L92-L103)
pub async fn [alter\_environment\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-environment.md#method.alter_environment_raw)( \&self, request: &[AlterEnvironmentRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterEnvironmentResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`AlterEnvironmentRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentRequest) to the `/alter/environment` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_environment.rs#L107-L119)
pub async fn [alter\_environment\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-environment.md#method.alter_environment_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[AlterEnvironmentRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterEnvironmentResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`AlterEnvironmentRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterEnvironmentRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.