public MapField<string, string> SecretVariables { get; }
A map of environment variable names to Secret Manager secret names.
The VM will access the named secrets to set the value of each environment
variable.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eEnvironment\u003c/code\u003e class in the Google Cloud Batch v1alpha API is used to define environment variables for task execution.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, ensuring compatibility and advanced functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnvironment\u003c/code\u003e class provides constructors for creating new instances, either blank or as a deep clone of another existing \u003ccode\u003eEnvironment\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting encrypted environment variables through \u003ccode\u003eEncryptedVariables\u003c/code\u003e, secret variables via \u003ccode\u003eSecretVariables\u003c/code\u003e, and standard variables through \u003ccode\u003eVariables\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnvironment\u003c/code\u003e class inherits members from the base \u003ccode\u003eobject\u003c/code\u003e class, including \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Batch v1alpha API - Class Environment (1.0.0-alpha31)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-alpha31 (latest)](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.Environment)\n- [1.0.0-alpha30](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/1.0.0-alpha30/Google.Cloud.Batch.V1Alpha.Environment) \n\n public sealed class Environment : IMessage\u003cEnvironment\u003e, IEquatable\u003cEnvironment\u003e, IDeepCloneable\u003cEnvironment\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Batch v1alpha API class Environment.\n\nAn Environment describes a collection of environment variables to set when\nexecuting Tasks. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Environment \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Environment](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.Environment), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Environment](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.Environment), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Environment](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.Environment), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Batch.V1Alpha](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.Batch.V1Alpha.dll\n\nConstructors\n------------\n\n### Environment()\n\n public Environment()\n\n### Environment(Environment)\n\n public Environment(Environment other)\n\nProperties\n----------\n\n### EncryptedVariables\n\n public Environment.Types.KMSEnvMap EncryptedVariables { get; set; }\n\nAn encrypted JSON dictionary where the key/value pairs correspond to\nenvironment variable names and their values.\n\n### SecretVariables\n\n public MapField\u003cstring, string\u003e SecretVariables { get; }\n\nA map of environment variable names to Secret Manager secret names.\nThe VM will access the named secrets to set the value of each environment\nvariable.\n\n### Variables\n\n public MapField\u003cstring, string\u003e Variables { get; }\n\nA map of environment variable names to values."]]