1# coding=utf-8
2# --------------------------------------------------------------------------
3# Copyright (c) Microsoft Corporation. All rights reserved.
4# Licensed under the MIT License. See License.txt in the project root for license information.
5# Code generated by Microsoft (R) AutoRest Code Generator.
6# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7# --------------------------------------------------------------------------
8
9from enum import Enum, EnumMeta
10from six import with_metaclass
11
12class _CaseInsensitiveEnumMeta(EnumMeta):
13    def __getitem__(self, name):
14        return super().__getitem__(name.upper())
15
16    def __getattr__(cls, name):
17        """Return the enum member matching `name`
18        We use __getattr__ instead of descriptors or inserting into the enum
19        class' __dict__ in order to support `name` and `value` being both
20        properties for enum members (which live in the class' __dict__) and
21        enum members themselves.
22        """
23        try:
24            return cls._member_map_[name.upper()]
25        except KeyError:
26            raise AttributeError(name)
27
28
29class AccountKeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
30    """The type of account key to regenerate.
31    """
32
33    #: The primary account key.
34    PRIMARY = "Primary"
35    #: The secondary account key.
36    SECONDARY = "Secondary"
37
38class AllocationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
39    """Whether the pool is resizing.
40    """
41
42    #: The pool is not resizing. There are no changes to the number of nodes in the pool in progress.
43    #: A pool enters this state when it is created and when no operations are being performed on the
44    #: pool to change the number of nodes.
45    STEADY = "Steady"
46    #: The pool is resizing; that is, compute nodes are being added to or removed from the pool.
47    RESIZING = "Resizing"
48    #: The pool was resizing, but the user has requested that the resize be stopped, but the stop
49    #: request has not yet been completed.
50    STOPPING = "Stopping"
51
52class AuthenticationMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
53    """The authentication mode for the Batch account.
54    """
55
56    #: The authentication mode using shared keys.
57    SHARED_KEY = "SharedKey"
58    #: The authentication mode using Azure Active Directory.
59    AAD = "AAD"
60    #: The authentication mode using task authentication tokens.
61    TASK_AUTHENTICATION_TOKEN = "TaskAuthenticationToken"
62
63class AutoStorageAuthenticationMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
64    """The authentication mode which the Batch service will use to manage the auto-storage account.
65    """
66
67    #: The Batch service will authenticate requests to auto-storage using storage account keys.
68    STORAGE_KEYS = "StorageKeys"
69    #: The Batch service will authenticate requests to auto-storage using the managed identity
70    #: assigned to the Batch account.
71    BATCH_ACCOUNT_MANAGED_IDENTITY = "BatchAccountManagedIdentity"
72
73class AutoUserScope(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
74    """The default value is Pool. If the pool is running Windows a value of Task should be specified
75    if stricter isolation between tasks is required. For example, if the task mutates the registry
76    in a way which could impact other tasks, or if certificates have been specified on the pool
77    which should not be accessible by normal tasks but should be accessible by start tasks.
78    """
79
80    #: Specifies that the service should create a new user for the task.
81    TASK = "Task"
82    #: Specifies that the task runs as the common auto user account which is created on every node in
83    #: a pool.
84    POOL = "Pool"
85
86class CachingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
87    """The type of caching to enable for the disk.
88    """
89
90    #: The caching mode for the disk is not enabled.
91    NONE = "None"
92    #: The caching mode for the disk is read only.
93    READ_ONLY = "ReadOnly"
94    #: The caching mode for the disk is read and write.
95    READ_WRITE = "ReadWrite"
96
97class CertificateFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
98    """The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.
99    """
100
101    #: The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.
102    PFX = "Pfx"
103    #: The certificate is a base64-encoded X.509 certificate.
104    CER = "Cer"
105
106class CertificateProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
107
108    #: The certificate is available for use in pools.
109    SUCCEEDED = "Succeeded"
110    #: The user has requested that the certificate be deleted, but the delete operation has not yet
111    #: completed. You may not reference the certificate when creating or updating pools.
112    DELETING = "Deleting"
113    #: The user requested that the certificate be deleted, but there are pools that still have
114    #: references to the certificate, or it is still installed on one or more compute nodes. (The
115    #: latter can occur if the certificate has been removed from the pool, but the node has not yet
116    #: restarted. Nodes refresh their certificates only when they restart.) You may use the cancel
117    #: certificate delete operation to cancel the delete, or the delete certificate operation to retry
118    #: the delete.
119    FAILED = "Failed"
120
121class CertificateStoreLocation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
122    """The default value is currentUser. This property is applicable only for pools configured with
123    Windows nodes (that is, created with cloudServiceConfiguration, or with
124    virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the
125    certificates are stored in a directory inside the task working directory and an environment
126    variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For
127    certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home
128    directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.
129    """
130
131    #: Certificates should be installed to the CurrentUser certificate store.
132    CURRENT_USER = "CurrentUser"
133    #: Certificates should be installed to the LocalMachine certificate store.
134    LOCAL_MACHINE = "LocalMachine"
135
136class CertificateVisibility(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
137
138    #: The certificate should be visible to the user account under which the start task is run. Note
139    #: that if AutoUser Scope is Pool for both the StartTask and a Task, this certificate will be
140    #: visible to the Task as well.
141    START_TASK = "StartTask"
142    #: The certificate should be visible to the user accounts under which job tasks are run.
143    TASK = "Task"
144    #: The certificate should be visible to the user accounts under which users remotely access the
145    #: node.
146    REMOTE_USER = "RemoteUser"
147
148class ComputeNodeDeallocationOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
149    """Determines what to do with a node and its running task(s) after it has been selected for
150    deallocation.
151    """
152
153    #: Terminate running task processes and requeue the tasks. The tasks will run again when a node is
154    #: available. Remove nodes as soon as tasks have been terminated.
155    REQUEUE = "Requeue"
156    #: Terminate running tasks. The tasks will be completed with failureInfo indicating that they were
157    #: terminated, and will not run again. Remove nodes as soon as tasks have been terminated.
158    TERMINATE = "Terminate"
159    #: Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove nodes
160    #: when all tasks have completed.
161    TASK_COMPLETION = "TaskCompletion"
162    #: Allow currently running tasks to complete, then wait for all task data retention periods to
163    #: expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have
164    #: expired.
165    RETAINED_DATA = "RetainedData"
166
167class ComputeNodeFillType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
168    """How tasks should be distributed across compute nodes.
169    """
170
171    #: Tasks should be assigned evenly across all nodes in the pool.
172    SPREAD = "Spread"
173    #: As many tasks as possible (taskSlotsPerNode) should be assigned to each node in the pool before
174    #: any tasks are assigned to the next node in the pool.
175    PACK = "Pack"
176
177class ContainerWorkingDirectory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
178    """A flag to indicate where the container task working directory is. The default is
179    'taskWorkingDirectory'.
180    """
181
182    #: Use the standard Batch service task working directory, which will contain the Task resource
183    #: files populated by Batch.
184    TASK_WORKING_DIRECTORY = "TaskWorkingDirectory"
185    #: Using container image defined working directory. Beware that this directory will not contain
186    #: the resource files downloaded by Batch.
187    CONTAINER_IMAGE_DEFAULT = "ContainerImageDefault"
188
189class DiskEncryptionTarget(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
190    """If omitted, no disks on the compute nodes in the pool will be encrypted.
191    """
192
193    #: The OS Disk on the compute node is encrypted.
194    OS_DISK = "OsDisk"
195    #: The temporary disk on the compute node is encrypted. On Linux this encryption applies to other
196    #: partitions (such as those on mounted data disks) when encryption occurs at boot time.
197    TEMPORARY_DISK = "TemporaryDisk"
198
199class ElevationLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
200    """The elevation level of the user.
201    """
202
203    #: The user is a standard user without elevated access.
204    NON_ADMIN = "NonAdmin"
205    #: The user is a user with elevated access and operates with full Administrator permissions.
206    ADMIN = "Admin"
207
208class InboundEndpointProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
209    """The protocol of the endpoint.
210    """
211
212    #: Use TCP for the endpoint.
213    TCP = "TCP"
214    #: Use UDP for the endpoint.
215    UDP = "UDP"
216
217class InterNodeCommunicationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
218    """This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can
219    reduce the chance of the requested number of nodes to be allocated in the pool. If not
220    specified, this value defaults to 'Disabled'.
221    """
222
223    #: Enable network communication between virtual machines.
224    ENABLED = "Enabled"
225    #: Disable network communication between virtual machines.
226    DISABLED = "Disabled"
227
228class IPAddressProvisioningType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
229    """The provisioning type for Public IP Addresses for the Batch Pool.
230    """
231
232    #: A public IP will be created and managed by Batch. There may be multiple public IPs depending on
233    #: the size of the Pool.
234    BATCH_MANAGED = "BatchManaged"
235    #: Public IPs are provided by the user and will be used to provision the Compute Nodes.
236    USER_MANAGED = "UserManaged"
237    #: No public IP Address will be created for the Compute Nodes in the Pool.
238    NO_PUBLIC_IP_ADDRESSES = "NoPublicIPAddresses"
239
240class KeySource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
241    """Type of the key source.
242    """
243
244    #: Batch creates and manages the encryption keys used to protect the account data.
245    MICROSOFT_BATCH = "Microsoft.Batch"
246    #: The encryption keys used to protect the account data are stored in an external key vault. If
247    #: this is set then the Batch Account identity must be set to ``SystemAssigned`` and a valid Key
248    #: Identifier must also be supplied under the keyVaultProperties.
249    MICROSOFT_KEY_VAULT = "Microsoft.KeyVault"
250
251class LoginMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
252    """Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is
253    interactive mode and for CloudServiceConfiguration pools is batch mode.
254    """
255
256    #: The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running
257    #: parallel processes.
258    BATCH = "Batch"
259    #: The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions
260    #: associated with the interactive login mode. If this is the case for an application used in your
261    #: task, then this option is recommended.
262    INTERACTIVE = "Interactive"
263
264class NameAvailabilityReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
265    """Gets the reason that a Batch account name could not be used. The Reason element is only
266    returned if NameAvailable is false.
267    """
268
269    #: The requested name is invalid.
270    INVALID = "Invalid"
271    #: The requested name is already in use.
272    ALREADY_EXISTS = "AlreadyExists"
273
274class NetworkSecurityGroupRuleAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
275    """The action that should be taken for a specified IP address, subnet range or tag.
276    """
277
278    #: Allow access.
279    ALLOW = "Allow"
280    #: Deny access.
281    DENY = "Deny"
282
283class NodePlacementPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
284    """The default value is regional.
285    """
286
287    #: All nodes in the pool will be allocated in the same region.
288    REGIONAL = "Regional"
289    #: Nodes in the pool will be spread across different zones with best effort balancing.
290    ZONAL = "Zonal"
291
292class PackageState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
293    """The current state of the application package.
294    """
295
296    #: The application package has been created but has not yet been activated.
297    PENDING = "Pending"
298    #: The application package is ready for use.
299    ACTIVE = "Active"
300
301class PoolAllocationMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
302    """The allocation mode for creating pools in the Batch account.
303    """
304
305    #: Pools will be allocated in subscriptions owned by the Batch service.
306    BATCH_SERVICE = "BatchService"
307    #: Pools will be allocated in a subscription owned by the user.
308    USER_SUBSCRIPTION = "UserSubscription"
309
310class PoolIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
311    """The type of identity used for the Batch Pool.
312    """
313
314    #: Batch pool has user assigned identities with it.
315    USER_ASSIGNED = "UserAssigned"
316    #: Batch pool has no identity associated with it. Setting ``None`` in update pool will remove
317    #: existing identities.
318    NONE = "None"
319
320class PoolProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
321    """The current state of the pool.
322    """
323
324    #: The pool is available to run tasks subject to the availability of compute nodes.
325    SUCCEEDED = "Succeeded"
326    #: The user has requested that the pool be deleted, but the delete operation has not yet
327    #: completed.
328    DELETING = "Deleting"
329
330class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
331    """The provisioning state of the private endpoint connection.
332    """
333
334    #: The connection status is final and is ready for use if Status is Approved.
335    SUCCEEDED = "Succeeded"
336    #: The user has requested that the connection status be updated, but the update operation has not
337    #: yet completed. You may not reference the connection when connecting the Batch account.
338    UPDATING = "Updating"
339    #: The user requested that the connection be updated and it failed. You may retry the update
340    #: operation.
341    FAILED = "Failed"
342
343class PrivateLinkServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
344    """The status of the Batch private endpoint connection
345    """
346
347    #: The private endpoint connection is approved and can be used to access Batch account.
348    APPROVED = "Approved"
349    #: The private endpoint connection is pending and cannot be used to access Batch account.
350    PENDING = "Pending"
351    #: The private endpoint connection is rejected and cannot be used to access Batch account.
352    REJECTED = "Rejected"
353    #: The private endpoint connection is disconnected and cannot be used to access Batch account.
354    DISCONNECTED = "Disconnected"
355
356class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
357    """The provisioned state of the resource
358    """
359
360    #: The account is in an invalid state.
361    INVALID = "Invalid"
362    #: The account is being created.
363    CREATING = "Creating"
364    #: The account is being deleted.
365    DELETING = "Deleting"
366    #: The account has been created and is ready for use.
367    SUCCEEDED = "Succeeded"
368    #: The last operation for the account is failed.
369    FAILED = "Failed"
370    #: The last operation for the account is cancelled.
371    CANCELLED = "Cancelled"
372
373class PublicNetworkAccessType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
374    """The network access type for operating on the resources in the Batch account.
375    """
376
377    #: Enables connectivity to Azure Batch through public DNS.
378    ENABLED = "Enabled"
379    #: Disables public connectivity and enables private connectivity to Azure Batch Service through
380    #: private endpoint resource.
381    DISABLED = "Disabled"
382
383class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
384    """The type of identity used for the Batch account.
385    """
386
387    #: Batch account has a system assigned identity with it.
388    SYSTEM_ASSIGNED = "SystemAssigned"
389    #: Batch account has user assigned identities with it.
390    USER_ASSIGNED = "UserAssigned"
391    #: Batch account has no identity associated with it. Setting ``None`` in update account will
392    #: remove existing identities.
393    NONE = "None"
394
395class StorageAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
396    """The storage account type for use in creating data disks.
397    """
398
399    #: The data disk should use standard locally redundant storage.
400    STANDARD_LRS = "Standard_LRS"
401    #: The data disk should use premium locally redundant storage.
402    PREMIUM_LRS = "Premium_LRS"
403