diff --git a/sdk/batch/azure-mgmt-batch/README.md b/sdk/batch/azure-mgmt-batch/README.md index e895f55e3899..6b7916ab24b7 100644 --- a/sdk/batch/azure-mgmt-batch/README.md +++ b/sdk/batch/azure-mgmt-batch/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Batch Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. - -## Usage - -For code examples, see [Batch -Management](https://docs.microsoft.com/python/api/overview/azure/batch) +For code examples, see [Batch Management](https://docs.microsoft.com/python/api/overview/azure/batch) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-batch%2FREADME.png) \ No newline at end of file + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-batch%2FREADME.png) diff --git a/sdk/batch/azure-mgmt-batch/azure/__init__.py b/sdk/batch/azure-mgmt-batch/azure/__init__.py index 69e3be50dac4..0260537a02bb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/__init__.py index 69e3be50dac4..0260537a02bb 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py index 3ae9cb636e1d..8fbaae1e6e1f 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py @@ -66,7 +66,7 @@ def __init__( super(BatchManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-03-01' + self.api_version = '2020-05-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py index df4831144de2..bdb1a346e49b 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/__init__.py @@ -24,6 +24,7 @@ from ._models_py3 import AzureFileShareConfiguration from ._models_py3 import BatchAccount from ._models_py3 import BatchAccountCreateParameters + from ._models_py3 import BatchAccountIdentity from ._models_py3 import BatchAccountKeys from ._models_py3 import BatchAccountRegenerateKeyParameters from ._models_py3 import BatchAccountUpdateParameters @@ -94,6 +95,7 @@ from ._models import AzureFileShareConfiguration from ._models import BatchAccount from ._models import BatchAccountCreateParameters + from ._models import BatchAccountIdentity from ._models import BatchAccountKeys from ._models import BatchAccountRegenerateKeyParameters from ._models import BatchAccountUpdateParameters @@ -161,6 +163,7 @@ KeySource, PoolAllocationMode, PublicNetworkAccessType, + ResourceIdentityType, ProvisioningState, PrivateEndpointConnectionProvisioningState, PrivateLinkServiceConnectionStatus, @@ -185,8 +188,6 @@ ContainerWorkingDirectory, CertificateStoreLocation, CertificateVisibility, - ContainerType, - ResourceType, NameAvailabilityReason, ) @@ -205,6 +206,7 @@ 'AzureFileShareConfiguration', 'BatchAccount', 'BatchAccountCreateParameters', + 'BatchAccountIdentity', 'BatchAccountKeys', 'BatchAccountRegenerateKeyParameters', 'BatchAccountUpdateParameters', @@ -271,6 +273,7 @@ 'KeySource', 'PoolAllocationMode', 'PublicNetworkAccessType', + 'ResourceIdentityType', 'ProvisioningState', 'PrivateEndpointConnectionProvisioningState', 'PrivateLinkServiceConnectionStatus', @@ -295,7 +298,5 @@ 'ContainerWorkingDirectory', 'CertificateStoreLocation', 'CertificateVisibility', - 'ContainerType', - 'ResourceType', 'NameAvailabilityReason', ] diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py index c5922eecd062..9ae6783a4397 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_batch_management_client_enums.py @@ -15,7 +15,7 @@ class KeySource(str, Enum): microsoft_batch = "Microsoft.Batch" #: Batch creates and manages the encryption keys used to protect the account data. - microsoft_key_vault = "Microsoft.KeyVault" #: The encryption keys used to protect the account data are stored in an external key vault. + microsoft_key_vault = "Microsoft.KeyVault" #: The encryption keys used to protect the account data are stored in an external key vault. If this is set then the Batch Account identity must be set to `SystemAssigned` and a valid Key Identifier must also be supplied under the keyVaultProperties. class PoolAllocationMode(str, Enum): @@ -30,6 +30,12 @@ class PublicNetworkAccessType(str, Enum): disabled = "Disabled" #: Disables public connectivity and enables private connectivity to Azure Batch Service through private endpoint resource. +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" #: Batch account has a system assigned identity with it. + none = "None" #: Batch account has no identity associated with it. Setting `None` in update account will remove existing identities. + + class ProvisioningState(str, Enum): invalid = "Invalid" #: The account is in an invalid state. @@ -188,16 +194,6 @@ class CertificateVisibility(str, Enum): remote_user = "RemoteUser" #: The certificate should be visible to the user accounts under which users remotely access the node. -class ContainerType(str, Enum): - - docker_compatible = "DockerCompatible" #: A Docker compatible container technology will be used to launch the containers. - - -class ResourceType(str, Enum): - - batch_accounts = "Microsoft.Batch/batchAccounts" #: The Batch account resource type. - - class NameAvailabilityReason(str, Enum): invalid = "Invalid" #: The requested name is invalid. diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py index ff8a76a72cdd..140cc80bfa1a 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models.py @@ -192,10 +192,13 @@ class ApplicationPackageReference(Model): All required parameters must be populated in order to send to Azure. - :param id: Required. + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str - :param version: If this is omitted, and no default version is specified - for this application, the request fails with the error code + :param version: The version of the application to deploy. If omitted, the + default version is deployed. If this is omitted, and no default version is + specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409. :type version: str @@ -221,9 +224,11 @@ class AutoScaleRun(Model): All required parameters must be populated in order to send to Azure. - :param evaluation_time: Required. + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime - :param results: Each variable value is returned in the form + :param results: The final values of all variables used in the evaluation + of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons. :type results: str :param error: Details of the error encountered evaluating the autoscale @@ -259,7 +264,7 @@ class AutoScaleRunError(Model): :param message: Required. A message describing the error, intended to be suitable for display in a user interface. :type message: str - :param details: + :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] """ @@ -286,10 +291,12 @@ class AutoScaleSettings(Model): All required parameters must be populated in order to send to Azure. - :param formula: Required. + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str - :param evaluation_interval: If omitted, the default value is 15 minutes - (PT15M). + :param evaluation_interval: The time interval at which to automatically + adjust the pool size according to the autoscale formula. If omitted, the + default value is 15 minutes (PT15M). :type evaluation_interval: timedelta """ @@ -364,12 +371,13 @@ class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The default value is Pool. If the pool is running Windows a - value of Task should be specified if stricter isolation between tasks is - required. For example, if the task mutates the registry in a way which - could impact other tasks, or if certificates have been specified on the - pool which should not be accessible by normal tasks but should be - accessible by start tasks. Possible values include: 'Task', 'Pool' + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. + Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope :param elevation_level: The elevation level of the auto user. The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' @@ -392,20 +400,22 @@ class AzureBlobFileSystemConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param account_name: Required. + :param account_name: Required. The Azure Storage Account name. :type account_name: str - :param container_name: Required. + :param container_name: Required. The Azure Blob Storage Container name. :type container_name: str - :param account_key: This property is mutually exclusive with sasKey and - one must be specified. + :param account_key: The Azure Storage Account key. This property is + mutually exclusive with sasKey and one must be specified. :type account_key: str - :param sas_key: This property is mutually exclusive with accountKey and - one must be specified. + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. :type sas_key: str - :param blobfuse_options: These are 'net use' options in Windows and - 'mount' options in Linux. + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. :type blobfuse_options: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str @@ -441,19 +451,21 @@ class AzureFileShareConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param account_name: Required. + :param account_name: Required. The Azure Storage account name. :type account_name: str - :param azure_file_url: Required. This is of the form + :param azure_file_url: Required. The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. :type azure_file_url: str - :param account_key: Required. + :param account_key: Required. The Azure Storage account key. :type account_key: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str - :param mount_options: These are 'net use' options in Windows and 'mount' - options in Linux. + :param mount_options: Additional command line options to pass to the mount + command. These are 'net use' options in Windows and 'mount' options in + Linux. :type mount_options: str """ @@ -570,6 +582,9 @@ class BatchAccount(Resource): associated with the Batch account. :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties :ivar encryption: The encryption configuration for the Batch account. + Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :vartype encryption: ~azure.mgmt.batch.models.EncryptionProperties :ivar dedicated_core_quota: The dedicated core quota for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, @@ -601,6 +616,8 @@ class BatchAccount(Resource): :ivar active_job_and_job_schedule_quota: The active job and job schedule quota for the Batch account. :vartype active_job_and_job_schedule_quota: int + :param identity: The identity of the Batch account. + :type identity: ~azure.mgmt.batch.models.BatchAccountIdentity """ _validation = { @@ -645,6 +662,7 @@ class BatchAccount(Resource): 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'identity': {'key': 'identity', 'type': 'BatchAccountIdentity'}, } def __init__(self, **kwargs): @@ -663,6 +681,7 @@ def __init__(self, **kwargs): self.dedicated_core_quota_per_vm_family_enforced = None self.pool_quota = None self.active_job_and_job_schedule_quota = None + self.identity = kwargs.get('identity', None) class BatchAccountCreateParameters(Model): @@ -694,7 +713,12 @@ class BatchAccountCreateParameters(Model): :type public_network_access: str or ~azure.mgmt.batch.models.PublicNetworkAccessType :param encryption: The encryption configuration for the Batch account. + Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :type encryption: ~azure.mgmt.batch.models.EncryptionProperties + :param identity: The identity of the Batch account. + :type identity: ~azure.mgmt.batch.models.BatchAccountIdentity """ _validation = { @@ -709,6 +733,7 @@ class BatchAccountCreateParameters(Model): 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccessType'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'identity': {'key': 'identity', 'type': 'BatchAccountIdentity'}, } def __init__(self, **kwargs): @@ -720,6 +745,47 @@ def __init__(self, **kwargs): self.key_vault_reference = kwargs.get('key_vault_reference', None) self.public_network_access = kwargs.get('public_network_access', "Enabled") self.encryption = kwargs.get('encryption', None) + self.identity = kwargs.get('identity', None) + + +class BatchAccountIdentity(Model): + """The identity of the Batch account, if configured. This is only used when + the user specifies 'Azure.KeyVault' as their Batch account encryption + configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal id of the Batch account. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the Batch account. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. The type of identity used for the Batch account. + Possible values include: 'SystemAssigned', 'None' + :type type: str or ~azure.mgmt.batch.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(BatchAccountIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) class BatchAccountKeys(Model): @@ -786,13 +852,19 @@ class BatchAccountUpdateParameters(Model): :param auto_storage: The properties related to the auto-storage account. :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties :param encryption: The encryption configuration for the Batch account. + Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :type encryption: ~azure.mgmt.batch.models.EncryptionProperties + :param identity: The identity of the Batch account. + :type identity: ~azure.mgmt.batch.models.BatchAccountIdentity """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'identity': {'key': 'identity', 'type': 'BatchAccountIdentity'}, } def __init__(self, **kwargs): @@ -800,6 +872,7 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) self.auto_storage = kwargs.get('auto_storage', None) self.encryption = kwargs.get('encryption', None) + self.identity = kwargs.get('identity', None) class BatchLocationQuota(Model): @@ -840,25 +913,29 @@ class Certificate(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :param thumbprint_algorithm: This must match the first portion of the - certificate name. Currently required to be 'SHA1'. + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. :type thumbprint_algorithm: str - :param thumbprint: This must match the thumbprint from the name. + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. :type thumbprint: str :param format: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: Possible values include: 'Succeeded', - 'Deleting', 'Failed' + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. :vartype provisioning_state_transition_time: datetime :ivar previous_provisioning_state: The previous provisioned state of the resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' :vartype previous_provisioning_state: str or ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. :vartype previous_provisioning_state_transition_time: datetime :ivar public_data: The public key of the certificate. :vartype public_data: str @@ -914,10 +991,12 @@ def __init__(self, **kwargs): class CertificateBaseProperties(Model): """CertificateBaseProperties. - :param thumbprint_algorithm: This must match the first portion of the - certificate name. Currently required to be 'SHA1'. + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. :type thumbprint_algorithm: str - :param thumbprint: This must match the thumbprint from the name. + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. :type thumbprint: str :param format: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' @@ -953,18 +1032,21 @@ class CertificateCreateOrUpdateParameters(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :param thumbprint_algorithm: This must match the first portion of the - certificate name. Currently required to be 'SHA1'. + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. :type thumbprint_algorithm: str - :param thumbprint: This must match the thumbprint from the name. + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. :type thumbprint: str :param format: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: Required. The maximum size is 10KB. + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. :type data: str - :param password: This must not be specified if the certificate format is - Cer. + :param password: The password to access the certificate's private key. + This must not be specified if the certificate format is Cer. :type password: str """ @@ -1003,28 +1085,32 @@ class CertificateReference(Model): All required parameters must be populated in order to send to Azure. - :param id: Required. + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. :type id: str - :param store_location: The default value is currentUser. This property is - applicable only for pools configured with Windows nodes (that is, created - with cloudServiceConfiguration, or with virtualMachineConfiguration using - a Windows image reference). For Linux compute nodes, the certificates are - stored in a directory inside the task working directory and an environment - variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for - this location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - Possible values include: 'CurrentUser', 'LocalMachine' + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' :type store_location: str or ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: This property is applicable only for pools configured - with Windows nodes (that is, created with cloudServiceConfiguration, or - with virtualMachineConfiguration using a Windows image reference). Common - store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, - TrustedPublisher, AuthRoot, AddressBook, but any custom store name can - also be used. The default value is My. + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only + for pools configured with Windows nodes (that is, created with + cloudServiceConfiguration, or with virtualMachineConfiguration using a + Windows image reference). Common store names include: My, Root, CA, Trust, + Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but + any custom store name can also be used. The default value is My. :type store_name: str - :param visibility: + :param visibility: Which user accounts on the compute node should have + access to the private data of the certificate. :type visibility: list[str or ~azure.mgmt.batch.models.CertificateVisibility] """ @@ -1123,18 +1209,22 @@ class CIFSMountConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param username: Required. + :param username: Required. The user to use for authentication against the + CIFS file system. :type username: str - :param source: Required. + :param source: Required. The URI of the file system to mount. :type source: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str - :param mount_options: These are 'net use' options in Windows and 'mount' - options in Linux. + :param mount_options: Additional command line options to pass to the mount + command. These are 'net use' options in Windows and 'mount' options in + Linux. :type mount_options: str - :param password: Required. + :param password: Required. The password to use for authentication against + the CIFS file system. :type password: str """ @@ -1227,7 +1317,8 @@ class CloudServiceConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param os_family: Required. Possible values are: 2 - OS Family 2, + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, @@ -1235,8 +1326,9 @@ class CloudServiceConfiguration(Model): OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str - :param os_version: The default value is * which specifies the latest - operating system version for the specified OS family. + :param os_version: The Azure Guest OS version to be installed on the + virtual machines in the pool. The default value is * which specifies the + latest operating system version for the specified OS family. :type os_version: str """ @@ -1263,16 +1355,18 @@ class ContainerConfiguration(Model): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Default value: "DockerCompatible" . + :ivar type: Required. The container technology to be used. Default value: + "DockerCompatible" . :vartype type: str - :param container_image_names: This is the full image reference, as would - be specified to "docker pull". An image will be sourced from the default - Docker registry unless the image is fully qualified with an alternative - registry. + :param container_image_names: The collection of container image names. + This is the full image reference, as would be specified to "docker pull". + An image will be sourced from the default Docker registry unless the image + is fully qualified with an alternative registry. :type container_image_names: list[str] - :param container_registries: If any images must be downloaded from a - private registry which requires credentials, then those credentials must - be provided here. + :param container_registries: Additional private registries from which + containers can be pulled. If any images must be downloaded from a private + registry which requires credentials, then those credentials must be + provided here. :type container_registries: list[~azure.mgmt.batch.models.ContainerRegistry] """ @@ -1300,29 +1394,30 @@ class ContainerRegistry(Model): All required parameters must be populated in order to send to Azure. - :param registry_server: If omitted, the default is "docker.io". + :param registry_server: The registry URL. If omitted, the default is + "docker.io". :type registry_server: str - :param username: Required. - :type username: str - :param password: Required. + :param user_name: Required. The user name to log into the registry server. + :type user_name: str + :param password: Required. The password to log into the registry server. :type password: str """ _validation = { - 'username': {'required': True}, + 'user_name': {'required': True}, 'password': {'required': True}, } _attribute_map = { 'registry_server': {'key': 'registryServer', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, + 'user_name': {'key': 'username', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, } def __init__(self, **kwargs): super(ContainerRegistry, self).__init__(**kwargs) self.registry_server = kwargs.get('registry_server', None) - self.username = kwargs.get('username', None) + self.user_name = kwargs.get('user_name', None) self.password = kwargs.get('password', None) @@ -1451,8 +1546,9 @@ class DiskEncryptionConfiguration(Model): Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image. - :param targets: On Linux pool, only "TemporaryDisk" is supported; on - Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + :param targets: The list of disk targets Batch Service will encrypt on the + compute node. On Linux pool, only "TemporaryDisk" is supported; on Windows + pool, "OsDisk" and "TemporaryDisk" must be specified. :type targets: list[str or ~azure.mgmt.batch.models.DiskEncryptionTarget] """ @@ -1466,7 +1562,9 @@ def __init__(self, **kwargs): class EncryptionProperties(Model): - """EncryptionProperties. + """Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :param key_source: Type of the key source. Possible values include: 'Microsoft.Batch', 'Microsoft.KeyVault' @@ -1492,9 +1590,9 @@ class EnvironmentSetting(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. + :param name: Required. The name of the environment variable. :type name: str - :param value: + :param value: The value of the environment variable. :type value: str """ @@ -1516,11 +1614,12 @@ def __init__(self, **kwargs): class FixedScaleSettings(Model): """Fixed scale settings for the pool. - :param resize_timeout: The default value is 15 minutes. Timeout values use - ISO 8601 format. For example, use PT10M for 10 minutes. The minimum value - is 5 minutes. If you specify a value less than 5 minutes, the Batch - service rejects the request with an error; if you are calling the REST API - directly, the HTTP status code is 400 (Bad Request). + :param resize_timeout: The timeout for allocation of compute nodes to the + pool. The default value is 15 minutes. Timeout values use ISO 8601 format. + For example, use PT10M for 10 minutes. The minimum value is 5 minutes. If + you specify a value less than 5 minutes, the Batch service rejects the + request with an error; if you are calling the REST API directly, the HTTP + status code is 400 (Bad Request). :type resize_timeout: timedelta :param target_dedicated_nodes: The desired number of dedicated compute nodes in the pool. At least one of targetDedicatedNodes, @@ -1559,19 +1658,27 @@ class ImageReference(Model): imageReferences verified by Azure Batch, see the 'List supported node agent SKUs' operation. - :param publisher: For example, Canonical or MicrosoftWindowsServer. + :param publisher: The publisher of the Azure Virtual Machines Marketplace + image. For example, Canonical or MicrosoftWindowsServer. :type publisher: str - :param offer: For example, UbuntuServer or WindowsServer. + :param offer: The offer type of the Azure Virtual Machines Marketplace + image. For example, UbuntuServer or WindowsServer. :type offer: str - :param sku: For example, 18.04-LTS or 2019-Datacenter. + :param sku: The SKU of the Azure Virtual Machines Marketplace image. For + example, 18.04-LTS or 2019-Datacenter. :type sku: str - :param version: A value of 'latest' can be specified to select the latest - version of an image. If omitted, the default is 'latest'. + :param version: The version of the Azure Virtual Machines Marketplace + image. A value of 'latest' can be specified to select the latest version + of an image. If omitted, the default is 'latest'. :type version: str - :param id: This property is mutually exclusive with other properties. The - Shared Image Gallery image must have replicas in the same region as the - Azure Batch account. For information about the firewall settings for the - Batch node agent to communicate with the Batch service see + :param id: The ARM resource identifier of the Shared Image Gallery Image. + Compute Nodes in the Pool will be created using this Image Id. This is of + the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId}. + This property is mutually exclusive with other properties. The Shared + Image Gallery image must have replicas in the same region as the Azure + Batch account. For information about the firewall settings for the Batch + node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -1599,13 +1706,14 @@ class InboundNatPool(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name must be unique within a Batch pool, can - contain letters, numbers, underscores, periods, and hyphens. Names must - start with a letter or number, must end with a letter, number, or - underscore, and cannot exceed 77 characters. If any invalid values are - provided the request fails with HTTP status code 400. + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: Required. Possible values include: 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol :param backend_port: Required. The port number on the compute node. This must be unique within a Batch pool. Acceptable values are between 1 and @@ -1628,12 +1736,13 @@ class InboundNatPool(Model): any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_end: int - :param network_security_group_rules: The maximum number of rules that can - be specified across all the endpoints on a Batch pool is 25. If no network - security group rules are specified, a default rule will be created to - allow inbound access to the specified backendPort. If the maximum number - of network security group rules is exceeded the request fails with HTTP - status code 400. + :param network_security_group_rules: A list of network security group + rules that will be applied to the endpoint. The maximum number of rules + that can be specified across all the endpoints on a Batch pool is 25. If + no network security group rules are specified, a default rule will be + created to allow inbound access to the specified backendPort. If the + maximum number of network security group rules is exceeded the request + fails with HTTP status code 400. :type network_security_group_rules: list[~azure.mgmt.batch.models.NetworkSecurityGroupRule] """ @@ -1666,10 +1775,16 @@ def __init__(self, **kwargs): class KeyVaultProperties(Model): - """KeyVaultProperties. + """KeyVault configuration when using an encryption KeySource of + Microsoft.KeyVault. :param key_identifier: Full path to the versioned secret. Example - https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053 + https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. + To be usable the following prerequisites must be met: + The Batch Account has a System Assigned identity + The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap + permissions + The KeyVault has soft-delete and purge protection enabled :type key_identifier: str """ @@ -1722,14 +1837,14 @@ class LinuxUserConfiguration(Model): must be specified together or not at all. If not specified the underlying operating system picks the gid. :type gid: int - :param ssh_private_key: The private key must not be password protected. - The private key is used to automatically configure asymmetric-key based - authentication for SSH between nodes in a Linux pool when the pool's - enableInterNodeCommunication property is true (it is ignored if - enableInterNodeCommunication is false). It does this by placing the key - pair into the user's .ssh directory. If not specified, password-less SSH - is not configured between nodes (no modification of the user's .ssh - directory is done). + :param ssh_private_key: The SSH private key for the user account. The + private key must not be password protected. The private key is used to + automatically configure asymmetric-key based authentication for SSH + between nodes in a Linux pool when the pool's enableInterNodeCommunication + property is true (it is ignored if enableInterNodeCommunication is false). + It does this by placing the key pair into the user's .ssh directory. If + not specified, password-less SSH is not configured between nodes (no + modification of the user's .ssh directory is done). :type ssh_private_key: str """ @@ -1754,9 +1869,9 @@ class MetadataItem(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. + :param name: Required. The name of the metadata item. :type name: str - :param value: Required. + :param value: Required. The value of the metadata item. :type value: str """ @@ -1816,27 +1931,29 @@ def __init__(self, **kwargs): class NetworkConfiguration(Model): """The network configuration for a pool. - :param subnet_id: The virtual network must be in the same region and - subscription as the Azure Batch account. The specified subnet should have - enough free IP addresses to accommodate the number of nodes in the pool. - If the subnet doesn't have enough free IP addresses, the pool will - partially allocate compute nodes and a resize error will occur. The - 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual - Machine Contributor' Role-Based Access Control (RBAC) role for the - specified VNet. The specified subnet must allow communication from the - Azure Batch service to be able to schedule tasks on the compute nodes. - This can be verified by checking if the specified VNet has any associated - Network Security Groups (NSG). If communication to the compute nodes in - the specified subnet is denied by an NSG, then the Batch service will set - the state of the compute nodes to unusable. If the specified VNet has any - associated Network Security Groups (NSG), then a few reserved system ports - must be enabled for inbound communication. For pools created with a - virtual machine configuration, enable ports 29876 and 29877, as well as - port 22 for Linux and port 3389 for Windows. For pools created with a - cloud service configuration, enable ports 10100, 20100, and 30100. Also - enable outbound connections to Azure Storage on port 443. For - cloudServiceConfiguration pools, only 'classic' VNETs are supported. For - more details see: + :param subnet_id: The ARM resource identifier of the virtual network + subnet which the compute nodes of the pool will join. This is of the form + /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + The virtual network must be in the same region and subscription as the + Azure Batch account. The specified subnet should have enough free IP + addresses to accommodate the number of nodes in the pool. If the subnet + doesn't have enough free IP addresses, the pool will partially allocate + compute nodes and a resize error will occur. The 'MicrosoftAzureBatch' + service principal must have the 'Classic Virtual Machine Contributor' + Role-Based Access Control (RBAC) role for the specified VNet. The + specified subnet must allow communication from the Azure Batch service to + be able to schedule tasks on the compute nodes. This can be verified by + checking if the specified VNet has any associated Network Security Groups + (NSG). If communication to the compute nodes in the specified subnet is + denied by an NSG, then the Batch service will set the state of the compute + nodes to unusable. If the specified VNet has any associated Network + Security Groups (NSG), then a few reserved system ports must be enabled + for inbound communication. For pools created with a virtual machine + configuration, enable ports 29876 and 29877, as well as port 22 for Linux + and port 3389 for Windows. For pools created with a cloud service + configuration, enable ports 10100, 20100, and 30100. Also enable outbound + connections to Azure Storage on port 443. For cloudServiceConfiguration + pools, only 'classic' VNETs are supported. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration :type subnet_id: str :param endpoint_configuration: The configuration for endpoints on compute @@ -1877,19 +1994,21 @@ class NetworkSecurityGroupRule(Model): priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400. :type priority: int - :param access: Required. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: Required. Valid values are a single IP - address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, - or * (for all addresses). If any other values are provided the request - fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str - :param source_port_ranges: Valid values are '*' (for all ports 0 - 65535) - or arrays of ports or port ranges (i.e. 100-200). The ports should in the - range of 0 to 65535 and the port ranges or ports can't overlap. If any - other values are provided the request fails with HTTP status code 400. - Default value will be *. + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. :type source_port_ranges: list[str] """ @@ -1919,14 +2038,16 @@ class NFSMountConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param source: Required. + :param source: Required. The URI of the file system to mount. :type source: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str - :param mount_options: These are 'net use' options in Windows and 'mount' - options in Linux. + :param mount_options: Additional command line options to pass to the mount + command. These are 'net use' options in Windows and 'mount' options in + Linux. :type mount_options: str """ @@ -1951,13 +2072,14 @@ def __init__(self, **kwargs): class Operation(Model): """A REST API operation. - :param name: This is of the format {provider}/{resource}/{operation} + :param name: The operation name. This is of the format + {provider}/{resource}/{operation} :type name: str - :param display: + :param display: The object that describes the operation. :type display: ~azure.mgmt.batch.models.OperationDisplay - :param origin: + :param origin: The intended executor of the operation. :type origin: str - :param properties: + :param properties: Properties of the operation. :type properties: object """ @@ -1979,13 +2101,14 @@ def __init__(self, **kwargs): class OperationDisplay(Model): """The object that describes the operation. - :param provider: + :param provider: Friendly name of the resource provider. :type provider: str - :param operation: For example: read, write, delete, or listKeys/action + :param operation: The operation type. For example: read, write, delete, or + listKeys/action :type operation: str - :param resource: + :param resource: The resource type on which the operation is performed. :type resource: str - :param description: + :param description: The friendly name of the operation. :type description: str """ @@ -2018,28 +2141,34 @@ class Pool(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :param display_name: The display name need not be unique and can contain - any Unicode characters up to a maximum length of 1024. + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. :type display_name: str - :ivar last_modified: This is the last time at which the pool level data, - such as the targetDedicatedNodes or autoScaleSettings, changed. It does - not factor in node-level changes such as a compute node changing state. + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. :vartype last_modified: datetime - :ivar creation_time: + :ivar creation_time: The creation time of the pool. :vartype creation_time: datetime - :ivar provisioning_state: Possible values include: 'Succeeded', 'Deleting' + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Possible values include: 'Steady', 'Resizing', - 'Stopping' + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. :vartype allocation_state_transition_time: datetime - :param vm_size: For information about available sizes of virtual machines - for Cloud Services pools (pools created with cloudServiceConfiguration), - see Sizes for Cloud Services + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the @@ -2071,11 +2200,12 @@ class Pool(ProxyResource): the autoscale formula. This property is set only if the pool automatically scales, i.e. autoScaleSettings are used. :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: This imposes restrictions on which nodes - can be assigned to the pool. Enabling this value can reduce the chance of - the requested number of nodes to be allocated in the pool. If not - specified, this value defaults to 'Disabled'. Possible values include: - 'Enabled', 'Disabled' + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' :type inter_node_communication: str or ~azure.mgmt.batch.models.InterNodeCommunicationState :param network_configuration: The network configuration for the pool. @@ -2089,40 +2219,47 @@ class Pool(ProxyResource): nodes in a pool. If not specified, the default is spread. :type task_scheduling_policy: ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: + :param user_accounts: The list of user accounts to be created on each node + in the pool. :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: The Batch service does not assign any meaning to - metadata; it is solely for the use of user code. + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. :type metadata: list[~azure.mgmt.batch.models.MetadataItem] :param start_task: A task specified to run on each compute node as it joins the pool. In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool. :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: For Windows compute nodes, the Batch service installs - the certificates to the specified certificate store and location. For - Linux compute nodes, the certificates are stored in a directory inside the - task working directory and an environment variable + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: Changes to application package references - affect all new compute nodes joining the pool, but do not affect compute - nodes that are already in the pool until they are rebooted or reimaged. - There is a maximum of 10 application package references on any given pool. + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. :type application_packages: list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses must be a - subset of available Batch service application licenses. If a license is - requested which is not supported, pool creation will fail. + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. :type application_licenses: list[str] :ivar resize_operation_status: Contains details about the current or last completed resize operation. :vartype resize_operation_status: ~azure.mgmt.batch.models.ResizeOperationStatus - :param mount_configuration: This supports Azure Files, NFS, CIFS/SMB, and - Blobfuse. + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. :type mount_configuration: list[~azure.mgmt.batch.models.MountConfiguration] """ @@ -2210,9 +2347,11 @@ class PoolEndpointConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param inbound_nat_pools: Required. The maximum number of inbound NAT - pools per Batch pool is 5. If the maximum number of inbound NAT pools is - exceeded the request fails with HTTP status code 400. + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] """ @@ -2235,7 +2374,9 @@ class PrivateEndpoint(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: + :ivar id: The ARM resource identifier of the private endpoint. This is of + the form + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}. :vartype id: str """ @@ -2266,8 +2407,8 @@ class PrivateEndpointConnection(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :ivar provisioning_state: Possible values include: 'Succeeded', - 'Updating', 'Failed' + :ivar provisioning_state: The provisioning state of the private endpoint + connection. Possible values include: 'Succeeded', 'Updating', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.batch.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The ARM resource identifier of the private @@ -2318,12 +2459,14 @@ class PrivateLinkResource(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :ivar group_id: The group id is used to establish the private link - connection. + :ivar group_id: The group id of the private link resource. The group id is + used to establish the private link connection. :vartype group_id: str - :ivar required_members: + :ivar required_members: The list of required members that are used to + establish the private link connection. :vartype required_members: list[str] - :ivar required_zone_names: + :ivar required_zone_names: The list of required zone names for the private + DNS resource name. :vartype required_zone_names: list[str] """ @@ -2368,9 +2511,9 @@ class PrivateLinkServiceConnectionState(Model): 'Disconnected' :type status: str or ~azure.mgmt.batch.models.PrivateLinkServiceConnectionStatus - :param description: + :param description: Description of the private Connection state. :type description: str - :ivar action_required: + :ivar action_required: Action required on the private connection state. :vartype action_required: str """ @@ -2400,11 +2543,12 @@ class PublicIPAddressConfiguration(Model): pool. The default value is BatchManaged. Possible values include: 'BatchManaged', 'UserManaged', 'NoPublicIPAddresses' :type provision: str or ~azure.mgmt.batch.models.IPAddressProvisioningType - :param ip_address_ids: The number of IPs specified here limits the maximum - size of the Pool - 50 dedicated nodes or 20 low-priority nodes can be - allocated for each public IP. For example, a pool needing 150 dedicated - VMs would need at least 3 public IPs specified. Each element of this - collection is of the form: + :param ip_address_ids: The list of public IPs which the Batch service will + use when provisioning Compute Nodes. The number of IPs specified here + limits the maximum size of the Pool - 50 dedicated nodes or 20 + low-priority nodes can be allocated for each public IP. For example, a + pool needing 150 dedicated VMs would need at least 3 public IPs specified. + Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. :type ip_address_ids: list[str] """ @@ -2431,7 +2575,7 @@ class ResizeError(Model): :param message: Required. A message describing the error, intended to be suitable for display in a user interface. :type message: str - :param details: + :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.ResizeError] """ @@ -2466,10 +2610,11 @@ class ResizeOperationStatus(Model): :param target_low_priority_nodes: The desired number of low-priority compute nodes in the pool. :type target_low_priority_nodes: int - :param resize_timeout: The default value is 15 minutes. The minimum value - is 5 minutes. If you specify a value less than 5 minutes, the Batch - service returns an error; if you are calling the REST API directly, the - HTTP status code is 400 (Bad Request). + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). :type resize_timeout: timedelta :param node_deallocation_option: Determines what to do with a node and its running task(s) if the pool size is decreasing. The default value is @@ -2477,10 +2622,11 @@ class ResizeOperationStatus(Model): 'TaskCompletion', 'RetainedData' :type node_deallocation_option: str or ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: + :param start_time: The time when this resize operation was started. :type start_time: datetime - :param errors: This property is set only if an error occurred during the - last pool resize, and only when the pool allocationState is Steady. + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. :type errors: list[~azure.mgmt.batch.models.ResizeError] """ @@ -2506,48 +2652,54 @@ def __init__(self, **kwargs): class ResourceFile(Model): """A single file or multiple files to be downloaded to a compute node. - :param auto_storage_container_name: The autoStorageContainerName, - storageContainerUrl and httpUrl properties are mutually exclusive and one - of them must be specified. + :param auto_storage_container_name: The storage container name in the auto + storage account. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. :type auto_storage_container_name: str - :param storage_container_url: The autoStorageContainerName, - storageContainerUrl and httpUrl properties are mutually exclusive and one - of them must be specified. This URL must be readable and listable using - anonymous access; that is, the Batch service does not present any - credentials when downloading the blob. There are two ways to get such a - URL for a blob in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the blob, or set the ACL for the - blob or its container to allow public access. - :type storage_container_url: str - :param http_url: The autoStorageContainerName, storageContainerUrl and + :param storage_container_url: The URL of the blob container within Azure + Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be - specified. If the URL is Azure Blob Storage, it must be readable using - anonymous access; that is, the Batch service does not present any - credentials when downloading the blob. There are two ways to get such a - URL for a blob in Azure storage: include a Shared Access Signature (SAS) - granting read permissions on the blob, or set the ACL for the blob or its - container to allow public access. + specified. This URL must be readable and listable using anonymous access; + that is, the Batch service does not present any credentials when + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. + :type storage_container_url: str + :param http_url: The URL of the file to download. The + autoStorageContainerName, storageContainerUrl and httpUrl properties are + mutually exclusive and one of them must be specified. If the URL is Azure + Blob Storage, it must be readable using anonymous access; that is, the + Batch service does not present any credentials when downloading the blob. + There are two ways to get such a URL for a blob in Azure storage: include + a Shared Access Signature (SAS) granting read permissions on the blob, or + set the ACL for the blob or its container to allow public access. :type http_url: str - :param blob_prefix: The property is valid only when + :param blob_prefix: The blob prefix to use when downloading blobs from an + Azure Storage container. Only the blobs whose names begin with the + specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded. :type blob_prefix: str - :param file_path: If the httpUrl property is specified, the filePath is - required and describes the path which the file will be downloaded to, - including the filename. Otherwise, if the autoStorageContainerName or - storageContainerUrl property is specified, filePath is optional and is the - directory to download the files to. In the case where filePath is used as - a directory, any directory structure already associated with the input - data will be retained in full and appended to the specified filePath - directory. The specified relative path cannot break out of the task's - working directory (for example by using '..'). + :param file_path: The location on the compute node to which to download + the file, relative to the task's working directory. If the httpUrl + property is specified, the filePath is required and describes the path + which the file will be downloaded to, including the filename. Otherwise, + if the autoStorageContainerName or storageContainerUrl property is + specified, filePath is optional and is the directory to download the files + to. In the case where filePath is used as a directory, any directory + structure already associated with the input data will be retained in full + and appended to the specified filePath directory. The specified relative + path cannot break out of the task's working directory (for example by + using '..'). :type file_path: str - :param file_mode: This property applies only to files being downloaded to - Linux compute nodes. It will be ignored if it is specified for a - resourceFile which will be downloaded to a Windows node. If this property - is not specified for a Linux node, then a default value of 0770 is applied - to the file. + :param file_mode: The file permission mode attribute in octal format. This + property applies only to files being downloaded to Linux compute nodes. It + will be ignored if it is specified for a resourceFile which will be + downloaded to a Windows node. If this property is not specified for a + Linux node, then a default value of 0770 is applied to the file. :type file_mode: str """ @@ -2611,16 +2763,19 @@ class StartTask(Model): install/launch services from the start task working directory, as this will block Batch from being able to re-run the start task. - :param command_line: The command line does not run under a shell, and - therefore cannot take advantage of shell features such as environment - variable expansion. If you want to take advantage of such features, you - should invoke the shell in the command line, for example using "cmd /c - MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if any - other properties of the startTask are specified. + :param command_line: The command line of the start task. The command line + does not run under a shell, and therefore cannot take advantage of shell + features such as environment variable expansion. If you want to take + advantage of such features, you should invoke the shell in the command + line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c + MyCommand" in Linux. Required if any other properties of the startTask are + specified. :type command_line: str - :param resource_files: + :param resource_files: A list of files that the Batch service will + download to the compute node before running the command line. :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] - :param environment_settings: + :param environment_settings: A list of environment variable settings for + the start task. :type environment_settings: list[~azure.mgmt.batch.models.EnvironmentSetting] :param user_identity: The user identity under which the start task runs. @@ -2683,19 +2838,21 @@ class TaskContainerSettings(Model): All required parameters must be populated in order to send to Azure. - :param container_run_options: These additional options are supplied as - arguments to the "docker create" command, in addition to those controlled - by the Batch Service. + :param container_run_options: Additional options to the container create + command. These additional options are supplied as arguments to the "docker + create" command, in addition to those controlled by the Batch Service. :type container_run_options: str - :param image_name: Required. This is the full image reference, as would be + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the image name, the tag ":latest" is used as a default. :type image_name: str :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. :type registry: ~azure.mgmt.batch.models.ContainerRegistry - :param working_directory: Possible values include: 'TaskWorkingDirectory', - 'ContainerImageDefault' + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' :type working_directory: str or ~azure.mgmt.batch.models.ContainerWorkingDirectory """ @@ -2724,7 +2881,8 @@ class TaskSchedulingPolicy(Model): All required parameters must be populated in order to send to Azure. - :param node_fill_type: Required. Possible values include: 'Spread', 'Pack' + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ @@ -2746,9 +2904,9 @@ class UserAccount(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. + :param name: Required. The name of the user account. :type name: str - :param password: Required. + :param password: Required. The password for the user account. :type password: str :param elevation_level: The elevation level of the user account. nonAdmin - The auto user is a standard user without elevated access. admin - The @@ -2796,8 +2954,9 @@ class UserIdentity(Model): Specify either the userName or autoUser property, but not both. - :param user_name: The userName and autoUser properties are mutually - exclusive; you must specify one but not both. + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. :type user_name: str :param auto_user: The auto user under which the task is run. The userName and autoUser properties are mutually exclusive; you must specify one but @@ -2825,26 +2984,29 @@ class VirtualMachineConfiguration(Model): :param image_reference: Required. A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: Required. The Batch node agent is a program that - runs on each node in the pool, and provides the command-and-control - interface between the node and the Batch service. There are different - implementations of the node agent, known as SKUs, for different operating - systems. You must specify a node agent SKU which matches the selected - image reference. To get the list of supported node agent SKUs along with - their list of verified image references, see the 'List supported node - agent SKUs' operation. + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. :type node_agent_sku_id: str :param windows_configuration: Windows operating system settings on the virtual machine. This property must not be specified if the imageReference specifies a Linux OS image. :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: This property must be specified if the compute nodes in - the pool need to have empty data disks attached to them. + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: This only applies to images that contain the Windows - operating system, and should only be used when you hold valid on-premises - licenses for the nodes which will be deployed. If omitted, no on-premises - licensing discount is applied. Values are: + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: Windows_Server - The on-premises license is for Windows Server. Windows_Client - The on-premises license is for Windows Client. :type license_type: str @@ -2936,10 +3098,10 @@ def __init__(self, **kwargs): class WindowsUserConfiguration(Model): """Properties used to create a user account on a Windows node. - :param login_mode: Specifies login mode for the user. The default value - for VirtualMachineConfiguration pools is interactive mode and for - CloudServiceConfiguration pools is batch mode. Possible values include: - 'Batch', 'Interactive' + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' :type login_mode: str or ~azure.mgmt.batch.models.LoginMode """ diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py index 0fdd6225e241..590efbb607a9 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_models_py3.py @@ -192,10 +192,13 @@ class ApplicationPackageReference(Model): All required parameters must be populated in order to send to Azure. - :param id: Required. + :param id: Required. The ID of the application package to install. This + must be inside the same batch account as the pool. This can either be a + reference to a specific version or the default version if one exists. :type id: str - :param version: If this is omitted, and no default version is specified - for this application, the request fails with the error code + :param version: The version of the application to deploy. If omitted, the + default version is deployed. If this is omitted, and no default version is + specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409. :type version: str @@ -221,9 +224,11 @@ class AutoScaleRun(Model): All required parameters must be populated in order to send to Azure. - :param evaluation_time: Required. + :param evaluation_time: Required. The time at which the autoscale formula + was last evaluated. :type evaluation_time: datetime - :param results: Each variable value is returned in the form + :param results: The final values of all variables used in the evaluation + of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons. :type results: str :param error: Details of the error encountered evaluating the autoscale @@ -259,7 +264,7 @@ class AutoScaleRunError(Model): :param message: Required. A message describing the error, intended to be suitable for display in a user interface. :type message: str - :param details: + :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.AutoScaleRunError] """ @@ -286,10 +291,12 @@ class AutoScaleSettings(Model): All required parameters must be populated in order to send to Azure. - :param formula: Required. + :param formula: Required. A formula for the desired number of compute + nodes in the pool. :type formula: str - :param evaluation_interval: If omitted, the default value is 15 minutes - (PT15M). + :param evaluation_interval: The time interval at which to automatically + adjust the pool size according to the autoscale formula. If omitted, the + default value is 15 minutes (PT15M). :type evaluation_interval: timedelta """ @@ -364,12 +371,13 @@ class AutoUserSpecification(Model): """Specifies the parameters for the auto user that runs a task on the Batch service. - :param scope: The default value is Pool. If the pool is running Windows a - value of Task should be specified if stricter isolation between tasks is - required. For example, if the task mutates the registry in a way which - could impact other tasks, or if certificates have been specified on the - pool which should not be accessible by normal tasks but should be - accessible by start tasks. Possible values include: 'Task', 'Pool' + :param scope: The scope for the auto user. The default value is Pool. If + the pool is running Windows a value of Task should be specified if + stricter isolation between tasks is required. For example, if the task + mutates the registry in a way which could impact other tasks, or if + certificates have been specified on the pool which should not be + accessible by normal tasks but should be accessible by start tasks. + Possible values include: 'Task', 'Pool' :type scope: str or ~azure.mgmt.batch.models.AutoUserScope :param elevation_level: The elevation level of the auto user. The default value is nonAdmin. Possible values include: 'NonAdmin', 'Admin' @@ -392,20 +400,22 @@ class AzureBlobFileSystemConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param account_name: Required. + :param account_name: Required. The Azure Storage Account name. :type account_name: str - :param container_name: Required. + :param container_name: Required. The Azure Blob Storage Container name. :type container_name: str - :param account_key: This property is mutually exclusive with sasKey and - one must be specified. + :param account_key: The Azure Storage Account key. This property is + mutually exclusive with sasKey and one must be specified. :type account_key: str - :param sas_key: This property is mutually exclusive with accountKey and - one must be specified. + :param sas_key: The Azure Storage SAS token. This property is mutually + exclusive with accountKey and one must be specified. :type sas_key: str - :param blobfuse_options: These are 'net use' options in Windows and - 'mount' options in Linux. + :param blobfuse_options: Additional command line options to pass to the + mount command. These are 'net use' options in Windows and 'mount' options + in Linux. :type blobfuse_options: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str @@ -441,19 +451,21 @@ class AzureFileShareConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param account_name: Required. + :param account_name: Required. The Azure Storage account name. :type account_name: str - :param azure_file_url: Required. This is of the form + :param azure_file_url: Required. The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. :type azure_file_url: str - :param account_key: Required. + :param account_key: Required. The Azure Storage account key. :type account_key: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str - :param mount_options: These are 'net use' options in Windows and 'mount' - options in Linux. + :param mount_options: Additional command line options to pass to the mount + command. These are 'net use' options in Windows and 'mount' options in + Linux. :type mount_options: str """ @@ -570,6 +582,9 @@ class BatchAccount(Resource): associated with the Batch account. :vartype auto_storage: ~azure.mgmt.batch.models.AutoStorageProperties :ivar encryption: The encryption configuration for the Batch account. + Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :vartype encryption: ~azure.mgmt.batch.models.EncryptionProperties :ivar dedicated_core_quota: The dedicated core quota for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, @@ -601,6 +616,8 @@ class BatchAccount(Resource): :ivar active_job_and_job_schedule_quota: The active job and job schedule quota for the Batch account. :vartype active_job_and_job_schedule_quota: int + :param identity: The identity of the Batch account. + :type identity: ~azure.mgmt.batch.models.BatchAccountIdentity """ _validation = { @@ -645,9 +662,10 @@ class BatchAccount(Resource): 'dedicated_core_quota_per_vm_family_enforced': {'key': 'properties.dedicatedCoreQuotaPerVMFamilyEnforced', 'type': 'bool'}, 'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'}, 'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'}, + 'identity': {'key': 'identity', 'type': 'BatchAccountIdentity'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, identity=None, **kwargs) -> None: super(BatchAccount, self).__init__(**kwargs) self.account_endpoint = None self.provisioning_state = None @@ -663,6 +681,7 @@ def __init__(self, **kwargs) -> None: self.dedicated_core_quota_per_vm_family_enforced = None self.pool_quota = None self.active_job_and_job_schedule_quota = None + self.identity = identity class BatchAccountCreateParameters(Model): @@ -694,7 +713,12 @@ class BatchAccountCreateParameters(Model): :type public_network_access: str or ~azure.mgmt.batch.models.PublicNetworkAccessType :param encryption: The encryption configuration for the Batch account. + Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :type encryption: ~azure.mgmt.batch.models.EncryptionProperties + :param identity: The identity of the Batch account. + :type identity: ~azure.mgmt.batch.models.BatchAccountIdentity """ _validation = { @@ -709,9 +733,10 @@ class BatchAccountCreateParameters(Model): 'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccessType'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'identity': {'key': 'identity', 'type': 'BatchAccountIdentity'}, } - def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, public_network_access="Enabled", encryption=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, public_network_access="Enabled", encryption=None, identity=None, **kwargs) -> None: super(BatchAccountCreateParameters, self).__init__(**kwargs) self.location = location self.tags = tags @@ -720,6 +745,47 @@ def __init__(self, *, location: str, tags=None, auto_storage=None, pool_allocati self.key_vault_reference = key_vault_reference self.public_network_access = public_network_access self.encryption = encryption + self.identity = identity + + +class BatchAccountIdentity(Model): + """The identity of the Batch account, if configured. This is only used when + the user specifies 'Azure.KeyVault' as their Batch account encryption + configuration. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal id of the Batch account. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the Batch account. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. The type of identity used for the Batch account. + Possible values include: 'SystemAssigned', 'None' + :type type: str or ~azure.mgmt.batch.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type, **kwargs) -> None: + super(BatchAccountIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type class BatchAccountKeys(Model): @@ -786,20 +852,27 @@ class BatchAccountUpdateParameters(Model): :param auto_storage: The properties related to the auto-storage account. :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties :param encryption: The encryption configuration for the Batch account. + Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :type encryption: ~azure.mgmt.batch.models.EncryptionProperties + :param identity: The identity of the Batch account. + :type identity: ~azure.mgmt.batch.models.BatchAccountIdentity """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperties'}, + 'identity': {'key': 'identity', 'type': 'BatchAccountIdentity'}, } - def __init__(self, *, tags=None, auto_storage=None, encryption=None, **kwargs) -> None: + def __init__(self, *, tags=None, auto_storage=None, encryption=None, identity=None, **kwargs) -> None: super(BatchAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.auto_storage = auto_storage self.encryption = encryption + self.identity = identity class BatchLocationQuota(Model): @@ -840,25 +913,29 @@ class Certificate(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :param thumbprint_algorithm: This must match the first portion of the - certificate name. Currently required to be 'SHA1'. + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. :type thumbprint_algorithm: str - :param thumbprint: This must match the thumbprint from the name. + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. :type thumbprint: str :param format: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :ivar provisioning_state: Possible values include: 'Succeeded', - 'Deleting', 'Failed' + :ivar provisioning_state: The provisioned state of the resource. Possible + values include: 'Succeeded', 'Deleting', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar provisioning_state_transition_time: + :ivar provisioning_state_transition_time: The time at which the + certificate entered its current state. :vartype provisioning_state_transition_time: datetime :ivar previous_provisioning_state: The previous provisioned state of the resource. Possible values include: 'Succeeded', 'Deleting', 'Failed' :vartype previous_provisioning_state: str or ~azure.mgmt.batch.models.CertificateProvisioningState - :ivar previous_provisioning_state_transition_time: + :ivar previous_provisioning_state_transition_time: The time at which the + certificate entered its previous state. :vartype previous_provisioning_state_transition_time: datetime :ivar public_data: The public key of the certificate. :vartype public_data: str @@ -914,10 +991,12 @@ def __init__(self, *, thumbprint_algorithm: str=None, thumbprint: str=None, form class CertificateBaseProperties(Model): """CertificateBaseProperties. - :param thumbprint_algorithm: This must match the first portion of the - certificate name. Currently required to be 'SHA1'. + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. :type thumbprint_algorithm: str - :param thumbprint: This must match the thumbprint from the name. + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. :type thumbprint: str :param format: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' @@ -953,18 +1032,21 @@ class CertificateCreateOrUpdateParameters(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :param thumbprint_algorithm: This must match the first portion of the - certificate name. Currently required to be 'SHA1'. + :param thumbprint_algorithm: The algorithm of the certificate thumbprint. + This must match the first portion of the certificate name. Currently + required to be 'SHA1'. :type thumbprint_algorithm: str - :param thumbprint: This must match the thumbprint from the name. + :param thumbprint: The thumbprint of the certificate. This must match the + thumbprint from the name. :type thumbprint: str :param format: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: 'Pfx', 'Cer' :type format: str or ~azure.mgmt.batch.models.CertificateFormat - :param data: Required. The maximum size is 10KB. + :param data: Required. The base64-encoded contents of the certificate. The + maximum size is 10KB. :type data: str - :param password: This must not be specified if the certificate format is - Cer. + :param password: The password to access the certificate's private key. + This must not be specified if the certificate format is Cer. :type password: str """ @@ -1003,28 +1085,32 @@ class CertificateReference(Model): All required parameters must be populated in order to send to Azure. - :param id: Required. + :param id: Required. The fully qualified ID of the certificate to install + on the pool. This must be inside the same batch account as the pool. :type id: str - :param store_location: The default value is currentUser. This property is - applicable only for pools configured with Windows nodes (that is, created - with cloudServiceConfiguration, or with virtualMachineConfiguration using - a Windows image reference). For Linux compute nodes, the certificates are - stored in a directory inside the task working directory and an environment - variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for - this location. For certificates with visibility of 'remoteUser', a 'certs' - directory is created in the user's home directory (e.g., - /home/{user-name}/certs) and certificates are placed in that directory. - Possible values include: 'CurrentUser', 'LocalMachine' + :param store_location: The location of the certificate store on the + compute node into which to install the certificate. The default value is + currentUser. This property is applicable only for pools configured with + Windows nodes (that is, created with cloudServiceConfiguration, or with + virtualMachineConfiguration using a Windows image reference). For Linux + compute nodes, the certificates are stored in a directory inside the task + working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is + supplied to the task to query for this location. For certificates with + visibility of 'remoteUser', a 'certs' directory is created in the user's + home directory (e.g., /home/{user-name}/certs) and certificates are placed + in that directory. Possible values include: 'CurrentUser', 'LocalMachine' :type store_location: str or ~azure.mgmt.batch.models.CertificateStoreLocation - :param store_name: This property is applicable only for pools configured - with Windows nodes (that is, created with cloudServiceConfiguration, or - with virtualMachineConfiguration using a Windows image reference). Common - store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, - TrustedPublisher, AuthRoot, AddressBook, but any custom store name can - also be used. The default value is My. + :param store_name: The name of the certificate store on the compute node + into which to install the certificate. This property is applicable only + for pools configured with Windows nodes (that is, created with + cloudServiceConfiguration, or with virtualMachineConfiguration using a + Windows image reference). Common store names include: My, Root, CA, Trust, + Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but + any custom store name can also be used. The default value is My. :type store_name: str - :param visibility: + :param visibility: Which user accounts on the compute node should have + access to the private data of the certificate. :type visibility: list[str or ~azure.mgmt.batch.models.CertificateVisibility] """ @@ -1123,18 +1209,22 @@ class CIFSMountConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param username: Required. + :param username: Required. The user to use for authentication against the + CIFS file system. :type username: str - :param source: Required. + :param source: Required. The URI of the file system to mount. :type source: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str - :param mount_options: These are 'net use' options in Windows and 'mount' - options in Linux. + :param mount_options: Additional command line options to pass to the mount + command. These are 'net use' options in Windows and 'mount' options in + Linux. :type mount_options: str - :param password: Required. + :param password: Required. The password to use for authentication against + the CIFS file system. :type password: str """ @@ -1227,7 +1317,8 @@ class CloudServiceConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param os_family: Required. Possible values are: 2 - OS Family 2, + :param os_family: Required. The Azure Guest OS family to be installed on + the virtual machines in the pool. Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, @@ -1235,8 +1326,9 @@ class CloudServiceConfiguration(Model): OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). :type os_family: str - :param os_version: The default value is * which specifies the latest - operating system version for the specified OS family. + :param os_version: The Azure Guest OS version to be installed on the + virtual machines in the pool. The default value is * which specifies the + latest operating system version for the specified OS family. :type os_version: str """ @@ -1263,16 +1355,18 @@ class ContainerConfiguration(Model): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Default value: "DockerCompatible" . + :ivar type: Required. The container technology to be used. Default value: + "DockerCompatible" . :vartype type: str - :param container_image_names: This is the full image reference, as would - be specified to "docker pull". An image will be sourced from the default - Docker registry unless the image is fully qualified with an alternative - registry. + :param container_image_names: The collection of container image names. + This is the full image reference, as would be specified to "docker pull". + An image will be sourced from the default Docker registry unless the image + is fully qualified with an alternative registry. :type container_image_names: list[str] - :param container_registries: If any images must be downloaded from a - private registry which requires credentials, then those credentials must - be provided here. + :param container_registries: Additional private registries from which + containers can be pulled. If any images must be downloaded from a private + registry which requires credentials, then those credentials must be + provided here. :type container_registries: list[~azure.mgmt.batch.models.ContainerRegistry] """ @@ -1300,29 +1394,30 @@ class ContainerRegistry(Model): All required parameters must be populated in order to send to Azure. - :param registry_server: If omitted, the default is "docker.io". + :param registry_server: The registry URL. If omitted, the default is + "docker.io". :type registry_server: str - :param username: Required. - :type username: str - :param password: Required. + :param user_name: Required. The user name to log into the registry server. + :type user_name: str + :param password: Required. The password to log into the registry server. :type password: str """ _validation = { - 'username': {'required': True}, + 'user_name': {'required': True}, 'password': {'required': True}, } _attribute_map = { 'registry_server': {'key': 'registryServer', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, + 'user_name': {'key': 'username', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, *, username: str, password: str, registry_server: str=None, **kwargs) -> None: + def __init__(self, *, user_name: str, password: str, registry_server: str=None, **kwargs) -> None: super(ContainerRegistry, self).__init__(**kwargs) self.registry_server = registry_server - self.username = username + self.user_name = user_name self.password = password @@ -1451,8 +1546,9 @@ class DiskEncryptionConfiguration(Model): Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image. - :param targets: On Linux pool, only "TemporaryDisk" is supported; on - Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + :param targets: The list of disk targets Batch Service will encrypt on the + compute node. On Linux pool, only "TemporaryDisk" is supported; on Windows + pool, "OsDisk" and "TemporaryDisk" must be specified. :type targets: list[str or ~azure.mgmt.batch.models.DiskEncryptionTarget] """ @@ -1466,7 +1562,9 @@ def __init__(self, *, targets=None, **kwargs) -> None: class EncryptionProperties(Model): - """EncryptionProperties. + """Configures how customer data is encrypted inside the Batch account. By + default, accounts are encrypted using a Microsoft managed key. For + additional control, a customer-managed key can be used instead. :param key_source: Type of the key source. Possible values include: 'Microsoft.Batch', 'Microsoft.KeyVault' @@ -1492,9 +1590,9 @@ class EnvironmentSetting(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. + :param name: Required. The name of the environment variable. :type name: str - :param value: + :param value: The value of the environment variable. :type value: str """ @@ -1516,11 +1614,12 @@ def __init__(self, *, name: str, value: str=None, **kwargs) -> None: class FixedScaleSettings(Model): """Fixed scale settings for the pool. - :param resize_timeout: The default value is 15 minutes. Timeout values use - ISO 8601 format. For example, use PT10M for 10 minutes. The minimum value - is 5 minutes. If you specify a value less than 5 minutes, the Batch - service rejects the request with an error; if you are calling the REST API - directly, the HTTP status code is 400 (Bad Request). + :param resize_timeout: The timeout for allocation of compute nodes to the + pool. The default value is 15 minutes. Timeout values use ISO 8601 format. + For example, use PT10M for 10 minutes. The minimum value is 5 minutes. If + you specify a value less than 5 minutes, the Batch service rejects the + request with an error; if you are calling the REST API directly, the HTTP + status code is 400 (Bad Request). :type resize_timeout: timedelta :param target_dedicated_nodes: The desired number of dedicated compute nodes in the pool. At least one of targetDedicatedNodes, @@ -1559,19 +1658,27 @@ class ImageReference(Model): imageReferences verified by Azure Batch, see the 'List supported node agent SKUs' operation. - :param publisher: For example, Canonical or MicrosoftWindowsServer. + :param publisher: The publisher of the Azure Virtual Machines Marketplace + image. For example, Canonical or MicrosoftWindowsServer. :type publisher: str - :param offer: For example, UbuntuServer or WindowsServer. + :param offer: The offer type of the Azure Virtual Machines Marketplace + image. For example, UbuntuServer or WindowsServer. :type offer: str - :param sku: For example, 18.04-LTS or 2019-Datacenter. + :param sku: The SKU of the Azure Virtual Machines Marketplace image. For + example, 18.04-LTS or 2019-Datacenter. :type sku: str - :param version: A value of 'latest' can be specified to select the latest - version of an image. If omitted, the default is 'latest'. + :param version: The version of the Azure Virtual Machines Marketplace + image. A value of 'latest' can be specified to select the latest version + of an image. If omitted, the default is 'latest'. :type version: str - :param id: This property is mutually exclusive with other properties. The - Shared Image Gallery image must have replicas in the same region as the - Azure Batch account. For information about the firewall settings for the - Batch node agent to communicate with the Batch service see + :param id: The ARM resource identifier of the Shared Image Gallery Image. + Compute Nodes in the Pool will be created using this Image Id. This is of + the form + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId}. + This property is mutually exclusive with other properties. The Shared + Image Gallery image must have replicas in the same region as the Azure + Batch account. For information about the firewall settings for the Batch + node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. :type id: str """ @@ -1599,13 +1706,14 @@ class InboundNatPool(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name must be unique within a Batch pool, can - contain letters, numbers, underscores, periods, and hyphens. Names must - start with a letter or number, must end with a letter, number, or - underscore, and cannot exceed 77 characters. If any invalid values are - provided the request fails with HTTP status code 400. + :param name: Required. The name of the endpoint. The name must be unique + within a Batch pool, can contain letters, numbers, underscores, periods, + and hyphens. Names must start with a letter or number, must end with a + letter, number, or underscore, and cannot exceed 77 characters. If any + invalid values are provided the request fails with HTTP status code 400. :type name: str - :param protocol: Required. Possible values include: 'TCP', 'UDP' + :param protocol: Required. The protocol of the endpoint. Possible values + include: 'TCP', 'UDP' :type protocol: str or ~azure.mgmt.batch.models.InboundEndpointProtocol :param backend_port: Required. The port number on the compute node. This must be unique within a Batch pool. Acceptable values are between 1 and @@ -1628,12 +1736,13 @@ class InboundNatPool(Model): any reserved or overlapping values are provided the request fails with HTTP status code 400. :type frontend_port_range_end: int - :param network_security_group_rules: The maximum number of rules that can - be specified across all the endpoints on a Batch pool is 25. If no network - security group rules are specified, a default rule will be created to - allow inbound access to the specified backendPort. If the maximum number - of network security group rules is exceeded the request fails with HTTP - status code 400. + :param network_security_group_rules: A list of network security group + rules that will be applied to the endpoint. The maximum number of rules + that can be specified across all the endpoints on a Batch pool is 25. If + no network security group rules are specified, a default rule will be + created to allow inbound access to the specified backendPort. If the + maximum number of network security group rules is exceeded the request + fails with HTTP status code 400. :type network_security_group_rules: list[~azure.mgmt.batch.models.NetworkSecurityGroupRule] """ @@ -1666,10 +1775,16 @@ def __init__(self, *, name: str, protocol, backend_port: int, frontend_port_rang class KeyVaultProperties(Model): - """KeyVaultProperties. + """KeyVault configuration when using an encryption KeySource of + Microsoft.KeyVault. :param key_identifier: Full path to the versioned secret. Example - https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053 + https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. + To be usable the following prerequisites must be met: + The Batch Account has a System Assigned identity + The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap + permissions + The KeyVault has soft-delete and purge protection enabled :type key_identifier: str """ @@ -1722,14 +1837,14 @@ class LinuxUserConfiguration(Model): must be specified together or not at all. If not specified the underlying operating system picks the gid. :type gid: int - :param ssh_private_key: The private key must not be password protected. - The private key is used to automatically configure asymmetric-key based - authentication for SSH between nodes in a Linux pool when the pool's - enableInterNodeCommunication property is true (it is ignored if - enableInterNodeCommunication is false). It does this by placing the key - pair into the user's .ssh directory. If not specified, password-less SSH - is not configured between nodes (no modification of the user's .ssh - directory is done). + :param ssh_private_key: The SSH private key for the user account. The + private key must not be password protected. The private key is used to + automatically configure asymmetric-key based authentication for SSH + between nodes in a Linux pool when the pool's enableInterNodeCommunication + property is true (it is ignored if enableInterNodeCommunication is false). + It does this by placing the key pair into the user's .ssh directory. If + not specified, password-less SSH is not configured between nodes (no + modification of the user's .ssh directory is done). :type ssh_private_key: str """ @@ -1754,9 +1869,9 @@ class MetadataItem(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. + :param name: Required. The name of the metadata item. :type name: str - :param value: Required. + :param value: Required. The value of the metadata item. :type value: str """ @@ -1816,27 +1931,29 @@ def __init__(self, *, azure_blob_file_system_configuration=None, nfs_mount_confi class NetworkConfiguration(Model): """The network configuration for a pool. - :param subnet_id: The virtual network must be in the same region and - subscription as the Azure Batch account. The specified subnet should have - enough free IP addresses to accommodate the number of nodes in the pool. - If the subnet doesn't have enough free IP addresses, the pool will - partially allocate compute nodes and a resize error will occur. The - 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual - Machine Contributor' Role-Based Access Control (RBAC) role for the - specified VNet. The specified subnet must allow communication from the - Azure Batch service to be able to schedule tasks on the compute nodes. - This can be verified by checking if the specified VNet has any associated - Network Security Groups (NSG). If communication to the compute nodes in - the specified subnet is denied by an NSG, then the Batch service will set - the state of the compute nodes to unusable. If the specified VNet has any - associated Network Security Groups (NSG), then a few reserved system ports - must be enabled for inbound communication. For pools created with a - virtual machine configuration, enable ports 29876 and 29877, as well as - port 22 for Linux and port 3389 for Windows. For pools created with a - cloud service configuration, enable ports 10100, 20100, and 30100. Also - enable outbound connections to Azure Storage on port 443. For - cloudServiceConfiguration pools, only 'classic' VNETs are supported. For - more details see: + :param subnet_id: The ARM resource identifier of the virtual network + subnet which the compute nodes of the pool will join. This is of the form + /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + The virtual network must be in the same region and subscription as the + Azure Batch account. The specified subnet should have enough free IP + addresses to accommodate the number of nodes in the pool. If the subnet + doesn't have enough free IP addresses, the pool will partially allocate + compute nodes and a resize error will occur. The 'MicrosoftAzureBatch' + service principal must have the 'Classic Virtual Machine Contributor' + Role-Based Access Control (RBAC) role for the specified VNet. The + specified subnet must allow communication from the Azure Batch service to + be able to schedule tasks on the compute nodes. This can be verified by + checking if the specified VNet has any associated Network Security Groups + (NSG). If communication to the compute nodes in the specified subnet is + denied by an NSG, then the Batch service will set the state of the compute + nodes to unusable. If the specified VNet has any associated Network + Security Groups (NSG), then a few reserved system ports must be enabled + for inbound communication. For pools created with a virtual machine + configuration, enable ports 29876 and 29877, as well as port 22 for Linux + and port 3389 for Windows. For pools created with a cloud service + configuration, enable ports 10100, 20100, and 30100. Also enable outbound + connections to Azure Storage on port 443. For cloudServiceConfiguration + pools, only 'classic' VNETs are supported. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration :type subnet_id: str :param endpoint_configuration: The configuration for endpoints on compute @@ -1877,19 +1994,21 @@ class NetworkSecurityGroupRule(Model): priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400. :type priority: int - :param access: Required. Possible values include: 'Allow', 'Deny' + :param access: Required. The action that should be taken for a specified + IP address, subnet range or tag. Possible values include: 'Allow', 'Deny' :type access: str or ~azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess - :param source_address_prefix: Required. Valid values are a single IP - address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, - or * (for all addresses). If any other values are provided the request - fails with HTTP status code 400. + :param source_address_prefix: Required. The source address prefix or tag + to match for the rule. Valid values are a single IP address (i.e. + 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all + addresses). If any other values are provided the request fails with HTTP + status code 400. :type source_address_prefix: str - :param source_port_ranges: Valid values are '*' (for all ports 0 - 65535) - or arrays of ports or port ranges (i.e. 100-200). The ports should in the - range of 0 to 65535 and the port ranges or ports can't overlap. If any - other values are provided the request fails with HTTP status code 400. - Default value will be *. + :param source_port_ranges: The source port ranges to match for the rule. + Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port + ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the + port ranges or ports can't overlap. If any other values are provided the + request fails with HTTP status code 400. Default value will be *. :type source_port_ranges: list[str] """ @@ -1919,14 +2038,16 @@ class NFSMountConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param source: Required. + :param source: Required. The URI of the file system to mount. :type source: str - :param relative_mount_path: Required. All file systems are mounted + :param relative_mount_path: Required. The relative path on the compute + node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. :type relative_mount_path: str - :param mount_options: These are 'net use' options in Windows and 'mount' - options in Linux. + :param mount_options: Additional command line options to pass to the mount + command. These are 'net use' options in Windows and 'mount' options in + Linux. :type mount_options: str """ @@ -1951,13 +2072,14 @@ def __init__(self, *, source: str, relative_mount_path: str, mount_options: str= class Operation(Model): """A REST API operation. - :param name: This is of the format {provider}/{resource}/{operation} + :param name: The operation name. This is of the format + {provider}/{resource}/{operation} :type name: str - :param display: + :param display: The object that describes the operation. :type display: ~azure.mgmt.batch.models.OperationDisplay - :param origin: + :param origin: The intended executor of the operation. :type origin: str - :param properties: + :param properties: Properties of the operation. :type properties: object """ @@ -1979,13 +2101,14 @@ def __init__(self, *, name: str=None, display=None, origin: str=None, properties class OperationDisplay(Model): """The object that describes the operation. - :param provider: + :param provider: Friendly name of the resource provider. :type provider: str - :param operation: For example: read, write, delete, or listKeys/action + :param operation: The operation type. For example: read, write, delete, or + listKeys/action :type operation: str - :param resource: + :param resource: The resource type on which the operation is performed. :type resource: str - :param description: + :param description: The friendly name of the operation. :type description: str """ @@ -2018,28 +2141,34 @@ class Pool(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :param display_name: The display name need not be unique and can contain - any Unicode characters up to a maximum length of 1024. + :param display_name: The display name for the pool. The display name need + not be unique and can contain any Unicode characters up to a maximum + length of 1024. :type display_name: str - :ivar last_modified: This is the last time at which the pool level data, - such as the targetDedicatedNodes or autoScaleSettings, changed. It does - not factor in node-level changes such as a compute node changing state. + :ivar last_modified: The last modified time of the pool. This is the last + time at which the pool level data, such as the targetDedicatedNodes or + autoScaleSettings, changed. It does not factor in node-level changes such + as a compute node changing state. :vartype last_modified: datetime - :ivar creation_time: + :ivar creation_time: The creation time of the pool. :vartype creation_time: datetime - :ivar provisioning_state: Possible values include: 'Succeeded', 'Deleting' + :ivar provisioning_state: The current state of the pool. Possible values + include: 'Succeeded', 'Deleting' :vartype provisioning_state: str or ~azure.mgmt.batch.models.PoolProvisioningState - :ivar provisioning_state_transition_time: + :ivar provisioning_state_transition_time: The time at which the pool + entered its current state. :vartype provisioning_state_transition_time: datetime - :ivar allocation_state: Possible values include: 'Steady', 'Resizing', - 'Stopping' + :ivar allocation_state: Whether the pool is resizing. Possible values + include: 'Steady', 'Resizing', 'Stopping' :vartype allocation_state: str or ~azure.mgmt.batch.models.AllocationState - :ivar allocation_state_transition_time: + :ivar allocation_state_transition_time: The time at which the pool entered + its current allocation state. :vartype allocation_state_transition_time: datetime - :param vm_size: For information about available sizes of virtual machines - for Cloud Services pools (pools created with cloudServiceConfiguration), - see Sizes for Cloud Services + :param vm_size: The size of virtual machines in the pool. All VMs in a + pool are the same size. For information about available sizes of virtual + machines for Cloud Services pools (pools created with + cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the @@ -2071,11 +2200,12 @@ class Pool(ProxyResource): the autoscale formula. This property is set only if the pool automatically scales, i.e. autoScaleSettings are used. :vartype auto_scale_run: ~azure.mgmt.batch.models.AutoScaleRun - :param inter_node_communication: This imposes restrictions on which nodes - can be assigned to the pool. Enabling this value can reduce the chance of - the requested number of nodes to be allocated in the pool. If not - specified, this value defaults to 'Disabled'. Possible values include: - 'Enabled', 'Disabled' + :param inter_node_communication: Whether the pool permits direct + communication between nodes. This imposes restrictions on which nodes can + be assigned to the pool. Enabling this value can reduce the chance of the + requested number of nodes to be allocated in the pool. If not specified, + this value defaults to 'Disabled'. Possible values include: 'Enabled', + 'Disabled' :type inter_node_communication: str or ~azure.mgmt.batch.models.InterNodeCommunicationState :param network_configuration: The network configuration for the pool. @@ -2089,40 +2219,47 @@ class Pool(ProxyResource): nodes in a pool. If not specified, the default is spread. :type task_scheduling_policy: ~azure.mgmt.batch.models.TaskSchedulingPolicy - :param user_accounts: + :param user_accounts: The list of user accounts to be created on each node + in the pool. :type user_accounts: list[~azure.mgmt.batch.models.UserAccount] - :param metadata: The Batch service does not assign any meaning to - metadata; it is solely for the use of user code. + :param metadata: A list of name-value pairs associated with the pool as + metadata. The Batch service does not assign any meaning to metadata; it is + solely for the use of user code. :type metadata: list[~azure.mgmt.batch.models.MetadataItem] :param start_task: A task specified to run on each compute node as it joins the pool. In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool. :type start_task: ~azure.mgmt.batch.models.StartTask - :param certificates: For Windows compute nodes, the Batch service installs - the certificates to the specified certificate store and location. For - Linux compute nodes, the certificates are stored in a directory inside the - task working directory and an environment variable + :param certificates: The list of certificates to be installed on each + compute node in the pool. For Windows compute nodes, the Batch service + installs the certificates to the specified certificate store and location. + For Linux compute nodes, the certificates are stored in a directory inside + the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. :type certificates: list[~azure.mgmt.batch.models.CertificateReference] - :param application_packages: Changes to application package references - affect all new compute nodes joining the pool, but do not affect compute - nodes that are already in the pool until they are rebooted or reimaged. - There is a maximum of 10 application package references on any given pool. + :param application_packages: The list of application packages to be + installed on each compute node in the pool. Changes to application package + references affect all new compute nodes joining the pool, but do not + affect compute nodes that are already in the pool until they are rebooted + or reimaged. There is a maximum of 10 application package references on + any given pool. :type application_packages: list[~azure.mgmt.batch.models.ApplicationPackageReference] - :param application_licenses: The list of application licenses must be a - subset of available Batch service application licenses. If a license is - requested which is not supported, pool creation will fail. + :param application_licenses: The list of application licenses the Batch + service will make available on each compute node in the pool. The list of + application licenses must be a subset of available Batch service + application licenses. If a license is requested which is not supported, + pool creation will fail. :type application_licenses: list[str] :ivar resize_operation_status: Contains details about the current or last completed resize operation. :vartype resize_operation_status: ~azure.mgmt.batch.models.ResizeOperationStatus - :param mount_configuration: This supports Azure Files, NFS, CIFS/SMB, and - Blobfuse. + :param mount_configuration: A list of file systems to mount on each node + in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. :type mount_configuration: list[~azure.mgmt.batch.models.MountConfiguration] """ @@ -2210,9 +2347,11 @@ class PoolEndpointConfiguration(Model): All required parameters must be populated in order to send to Azure. - :param inbound_nat_pools: Required. The maximum number of inbound NAT - pools per Batch pool is 5. If the maximum number of inbound NAT pools is - exceeded the request fails with HTTP status code 400. + :param inbound_nat_pools: Required. A list of inbound NAT pools that can + be used to address specific ports on an individual compute node + externally. The maximum number of inbound NAT pools per Batch pool is 5. + If the maximum number of inbound NAT pools is exceeded the request fails + with HTTP status code 400. :type inbound_nat_pools: list[~azure.mgmt.batch.models.InboundNatPool] """ @@ -2235,7 +2374,9 @@ class PrivateEndpoint(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: + :ivar id: The ARM resource identifier of the private endpoint. This is of + the form + /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}. :vartype id: str """ @@ -2266,8 +2407,8 @@ class PrivateEndpointConnection(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :ivar provisioning_state: Possible values include: 'Succeeded', - 'Updating', 'Failed' + :ivar provisioning_state: The provisioning state of the private endpoint + connection. Possible values include: 'Succeeded', 'Updating', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.batch.models.PrivateEndpointConnectionProvisioningState :param private_endpoint: The ARM resource identifier of the private @@ -2318,12 +2459,14 @@ class PrivateLinkResource(ProxyResource): :vartype type: str :ivar etag: The ETag of the resource, used for concurrency statements. :vartype etag: str - :ivar group_id: The group id is used to establish the private link - connection. + :ivar group_id: The group id of the private link resource. The group id is + used to establish the private link connection. :vartype group_id: str - :ivar required_members: + :ivar required_members: The list of required members that are used to + establish the private link connection. :vartype required_members: list[str] - :ivar required_zone_names: + :ivar required_zone_names: The list of required zone names for the private + DNS resource name. :vartype required_zone_names: list[str] """ @@ -2368,9 +2511,9 @@ class PrivateLinkServiceConnectionState(Model): 'Disconnected' :type status: str or ~azure.mgmt.batch.models.PrivateLinkServiceConnectionStatus - :param description: + :param description: Description of the private Connection state. :type description: str - :ivar action_required: + :ivar action_required: Action required on the private connection state. :vartype action_required: str """ @@ -2400,11 +2543,12 @@ class PublicIPAddressConfiguration(Model): pool. The default value is BatchManaged. Possible values include: 'BatchManaged', 'UserManaged', 'NoPublicIPAddresses' :type provision: str or ~azure.mgmt.batch.models.IPAddressProvisioningType - :param ip_address_ids: The number of IPs specified here limits the maximum - size of the Pool - 50 dedicated nodes or 20 low-priority nodes can be - allocated for each public IP. For example, a pool needing 150 dedicated - VMs would need at least 3 public IPs specified. Each element of this - collection is of the form: + :param ip_address_ids: The list of public IPs which the Batch service will + use when provisioning Compute Nodes. The number of IPs specified here + limits the maximum size of the Pool - 50 dedicated nodes or 20 + low-priority nodes can be allocated for each public IP. For example, a + pool needing 150 dedicated VMs would need at least 3 public IPs specified. + Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. :type ip_address_ids: list[str] """ @@ -2431,7 +2575,7 @@ class ResizeError(Model): :param message: Required. A message describing the error, intended to be suitable for display in a user interface. :type message: str - :param details: + :param details: Additional details about the error. :type details: list[~azure.mgmt.batch.models.ResizeError] """ @@ -2466,10 +2610,11 @@ class ResizeOperationStatus(Model): :param target_low_priority_nodes: The desired number of low-priority compute nodes in the pool. :type target_low_priority_nodes: int - :param resize_timeout: The default value is 15 minutes. The minimum value - is 5 minutes. If you specify a value less than 5 minutes, the Batch - service returns an error; if you are calling the REST API directly, the - HTTP status code is 400 (Bad Request). + :param resize_timeout: The timeout for allocation of compute nodes to the + pool or removal of compute nodes from the pool. The default value is 15 + minutes. The minimum value is 5 minutes. If you specify a value less than + 5 minutes, the Batch service returns an error; if you are calling the REST + API directly, the HTTP status code is 400 (Bad Request). :type resize_timeout: timedelta :param node_deallocation_option: Determines what to do with a node and its running task(s) if the pool size is decreasing. The default value is @@ -2477,10 +2622,11 @@ class ResizeOperationStatus(Model): 'TaskCompletion', 'RetainedData' :type node_deallocation_option: str or ~azure.mgmt.batch.models.ComputeNodeDeallocationOption - :param start_time: + :param start_time: The time when this resize operation was started. :type start_time: datetime - :param errors: This property is set only if an error occurred during the - last pool resize, and only when the pool allocationState is Steady. + :param errors: Details of any errors encountered while performing the last + resize on the pool. This property is set only if an error occurred during + the last pool resize, and only when the pool allocationState is Steady. :type errors: list[~azure.mgmt.batch.models.ResizeError] """ @@ -2506,48 +2652,54 @@ def __init__(self, *, target_dedicated_nodes: int=None, target_low_priority_node class ResourceFile(Model): """A single file or multiple files to be downloaded to a compute node. - :param auto_storage_container_name: The autoStorageContainerName, - storageContainerUrl and httpUrl properties are mutually exclusive and one - of them must be specified. + :param auto_storage_container_name: The storage container name in the auto + storage account. The autoStorageContainerName, storageContainerUrl and + httpUrl properties are mutually exclusive and one of them must be + specified. :type auto_storage_container_name: str - :param storage_container_url: The autoStorageContainerName, - storageContainerUrl and httpUrl properties are mutually exclusive and one - of them must be specified. This URL must be readable and listable using - anonymous access; that is, the Batch service does not present any - credentials when downloading the blob. There are two ways to get such a - URL for a blob in Azure storage: include a Shared Access Signature (SAS) - granting read and list permissions on the blob, or set the ACL for the - blob or its container to allow public access. - :type storage_container_url: str - :param http_url: The autoStorageContainerName, storageContainerUrl and + :param storage_container_url: The URL of the blob container within Azure + Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be - specified. If the URL is Azure Blob Storage, it must be readable using - anonymous access; that is, the Batch service does not present any - credentials when downloading the blob. There are two ways to get such a - URL for a blob in Azure storage: include a Shared Access Signature (SAS) - granting read permissions on the blob, or set the ACL for the blob or its - container to allow public access. + specified. This URL must be readable and listable using anonymous access; + that is, the Batch service does not present any credentials when + downloading the blob. There are two ways to get such a URL for a blob in + Azure storage: include a Shared Access Signature (SAS) granting read and + list permissions on the blob, or set the ACL for the blob or its container + to allow public access. + :type storage_container_url: str + :param http_url: The URL of the file to download. The + autoStorageContainerName, storageContainerUrl and httpUrl properties are + mutually exclusive and one of them must be specified. If the URL is Azure + Blob Storage, it must be readable using anonymous access; that is, the + Batch service does not present any credentials when downloading the blob. + There are two ways to get such a URL for a blob in Azure storage: include + a Shared Access Signature (SAS) granting read permissions on the blob, or + set the ACL for the blob or its container to allow public access. :type http_url: str - :param blob_prefix: The property is valid only when + :param blob_prefix: The blob prefix to use when downloading blobs from an + Azure Storage container. Only the blobs whose names begin with the + specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded. :type blob_prefix: str - :param file_path: If the httpUrl property is specified, the filePath is - required and describes the path which the file will be downloaded to, - including the filename. Otherwise, if the autoStorageContainerName or - storageContainerUrl property is specified, filePath is optional and is the - directory to download the files to. In the case where filePath is used as - a directory, any directory structure already associated with the input - data will be retained in full and appended to the specified filePath - directory. The specified relative path cannot break out of the task's - working directory (for example by using '..'). + :param file_path: The location on the compute node to which to download + the file, relative to the task's working directory. If the httpUrl + property is specified, the filePath is required and describes the path + which the file will be downloaded to, including the filename. Otherwise, + if the autoStorageContainerName or storageContainerUrl property is + specified, filePath is optional and is the directory to download the files + to. In the case where filePath is used as a directory, any directory + structure already associated with the input data will be retained in full + and appended to the specified filePath directory. The specified relative + path cannot break out of the task's working directory (for example by + using '..'). :type file_path: str - :param file_mode: This property applies only to files being downloaded to - Linux compute nodes. It will be ignored if it is specified for a - resourceFile which will be downloaded to a Windows node. If this property - is not specified for a Linux node, then a default value of 0770 is applied - to the file. + :param file_mode: The file permission mode attribute in octal format. This + property applies only to files being downloaded to Linux compute nodes. It + will be ignored if it is specified for a resourceFile which will be + downloaded to a Windows node. If this property is not specified for a + Linux node, then a default value of 0770 is applied to the file. :type file_mode: str """ @@ -2611,16 +2763,19 @@ class StartTask(Model): install/launch services from the start task working directory, as this will block Batch from being able to re-run the start task. - :param command_line: The command line does not run under a shell, and - therefore cannot take advantage of shell features such as environment - variable expansion. If you want to take advantage of such features, you - should invoke the shell in the command line, for example using "cmd /c - MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if any - other properties of the startTask are specified. + :param command_line: The command line of the start task. The command line + does not run under a shell, and therefore cannot take advantage of shell + features such as environment variable expansion. If you want to take + advantage of such features, you should invoke the shell in the command + line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c + MyCommand" in Linux. Required if any other properties of the startTask are + specified. :type command_line: str - :param resource_files: + :param resource_files: A list of files that the Batch service will + download to the compute node before running the command line. :type resource_files: list[~azure.mgmt.batch.models.ResourceFile] - :param environment_settings: + :param environment_settings: A list of environment variable settings for + the start task. :type environment_settings: list[~azure.mgmt.batch.models.EnvironmentSetting] :param user_identity: The user identity under which the start task runs. @@ -2683,19 +2838,21 @@ class TaskContainerSettings(Model): All required parameters must be populated in order to send to Azure. - :param container_run_options: These additional options are supplied as - arguments to the "docker create" command, in addition to those controlled - by the Batch Service. + :param container_run_options: Additional options to the container create + command. These additional options are supplied as arguments to the "docker + create" command, in addition to those controlled by the Batch Service. :type container_run_options: str - :param image_name: Required. This is the full image reference, as would be + :param image_name: Required. The image to use to create the container in + which the task will run. This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the image name, the tag ":latest" is used as a default. :type image_name: str :param registry: The private registry which contains the container image. This setting can be omitted if was already provided at pool creation. :type registry: ~azure.mgmt.batch.models.ContainerRegistry - :param working_directory: Possible values include: 'TaskWorkingDirectory', - 'ContainerImageDefault' + :param working_directory: A flag to indicate where the container task + working directory is. The default is 'taskWorkingDirectory'. Possible + values include: 'TaskWorkingDirectory', 'ContainerImageDefault' :type working_directory: str or ~azure.mgmt.batch.models.ContainerWorkingDirectory """ @@ -2724,7 +2881,8 @@ class TaskSchedulingPolicy(Model): All required parameters must be populated in order to send to Azure. - :param node_fill_type: Required. Possible values include: 'Spread', 'Pack' + :param node_fill_type: Required. How tasks should be distributed across + compute nodes. Possible values include: 'Spread', 'Pack' :type node_fill_type: str or ~azure.mgmt.batch.models.ComputeNodeFillType """ @@ -2746,9 +2904,9 @@ class UserAccount(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. + :param name: Required. The name of the user account. :type name: str - :param password: Required. + :param password: Required. The password for the user account. :type password: str :param elevation_level: The elevation level of the user account. nonAdmin - The auto user is a standard user without elevated access. admin - The @@ -2796,8 +2954,9 @@ class UserIdentity(Model): Specify either the userName or autoUser property, but not both. - :param user_name: The userName and autoUser properties are mutually - exclusive; you must specify one but not both. + :param user_name: The name of the user identity under which the task is + run. The userName and autoUser properties are mutually exclusive; you must + specify one but not both. :type user_name: str :param auto_user: The auto user under which the task is run. The userName and autoUser properties are mutually exclusive; you must specify one but @@ -2825,26 +2984,29 @@ class VirtualMachineConfiguration(Model): :param image_reference: Required. A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. :type image_reference: ~azure.mgmt.batch.models.ImageReference - :param node_agent_sku_id: Required. The Batch node agent is a program that - runs on each node in the pool, and provides the command-and-control - interface between the node and the Batch service. There are different - implementations of the node agent, known as SKUs, for different operating - systems. You must specify a node agent SKU which matches the selected - image reference. To get the list of supported node agent SKUs along with - their list of verified image references, see the 'List supported node - agent SKUs' operation. + :param node_agent_sku_id: Required. The SKU of the Batch node agent to be + provisioned on compute nodes in the pool. The Batch node agent is a + program that runs on each node in the pool, and provides the + command-and-control interface between the node and the Batch service. + There are different implementations of the node agent, known as SKUs, for + different operating systems. You must specify a node agent SKU which + matches the selected image reference. To get the list of supported node + agent SKUs along with their list of verified image references, see the + 'List supported node agent SKUs' operation. :type node_agent_sku_id: str :param windows_configuration: Windows operating system settings on the virtual machine. This property must not be specified if the imageReference specifies a Linux OS image. :type windows_configuration: ~azure.mgmt.batch.models.WindowsConfiguration - :param data_disks: This property must be specified if the compute nodes in - the pool need to have empty data disks attached to them. + :param data_disks: The configuration for data disks attached to the + compute nodes in the pool. This property must be specified if the compute + nodes in the pool need to have empty data disks attached to them. :type data_disks: list[~azure.mgmt.batch.models.DataDisk] - :param license_type: This only applies to images that contain the Windows - operating system, and should only be used when you hold valid on-premises - licenses for the nodes which will be deployed. If omitted, no on-premises - licensing discount is applied. Values are: + :param license_type: The type of on-premises license to be used when + deploying the operating system. This only applies to images that contain + the Windows operating system, and should only be used when you hold valid + on-premises licenses for the nodes which will be deployed. If omitted, no + on-premises licensing discount is applied. Values are: Windows_Server - The on-premises license is for Windows Server. Windows_Client - The on-premises license is for Windows Client. :type license_type: str @@ -2936,10 +3098,10 @@ def __init__(self, *, enable_automatic_updates: bool=None, **kwargs) -> None: class WindowsUserConfiguration(Model): """Properties used to create a user account on a Windows node. - :param login_mode: Specifies login mode for the user. The default value - for VirtualMachineConfiguration pools is interactive mode and for - CloudServiceConfiguration pools is batch mode. Possible values include: - 'Batch', 'Interactive' + :param login_mode: Login mode for user. Specifies login mode for the user. + The default value for VirtualMachineConfiguration pools is interactive + mode and for CloudServiceConfiguration pools is batch mode. Possible + values include: 'Batch', 'Interactive' :type login_mode: str or ~azure.mgmt.batch.models.LoginMode """ diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py index 6ad9c2af0297..5dd781c2419d 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/models/_paged_models.py @@ -25,8 +25,6 @@ class BatchAccountPaged(Paged): def __init__(self, *args, **kwargs): super(BatchAccountPaged, self).__init__(*args, **kwargs) - - class ApplicationPackagePaged(Paged): """ A paging container for iterating over a list of :class:`ApplicationPackage ` object @@ -40,8 +38,6 @@ class ApplicationPackagePaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPackagePaged, self).__init__(*args, **kwargs) - - class ApplicationPaged(Paged): """ A paging container for iterating over a list of :class:`Application ` object @@ -55,8 +51,6 @@ class ApplicationPaged(Paged): def __init__(self, *args, **kwargs): super(ApplicationPaged, self).__init__(*args, **kwargs) - - class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object @@ -70,8 +64,6 @@ class OperationPaged(Paged): def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) - - class CertificatePaged(Paged): """ A paging container for iterating over a list of :class:`Certificate ` object @@ -85,8 +77,6 @@ class CertificatePaged(Paged): def __init__(self, *args, **kwargs): super(CertificatePaged, self).__init__(*args, **kwargs) - - class PrivateLinkResourcePaged(Paged): """ A paging container for iterating over a list of :class:`PrivateLinkResource ` object @@ -100,8 +90,6 @@ class PrivateLinkResourcePaged(Paged): def __init__(self, *args, **kwargs): super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) - - class PrivateEndpointConnectionPaged(Paged): """ A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object @@ -115,8 +103,6 @@ class PrivateEndpointConnectionPaged(Paged): def __init__(self, *args, **kwargs): super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) - - class PoolPaged(Paged): """ A paging container for iterating over a list of :class:`Pool ` object diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py index 5262642d1ec8..300b5b78e96e 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_operations.py @@ -25,7 +25,7 @@ class ApplicationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index 8ca98e94ef87..b68b6c2b85ef 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py @@ -25,7 +25,7 @@ class ApplicationPackageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py index 0fb12c2fc880..1a00942476e8 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_batch_account_operations.py @@ -27,7 +27,7 @@ class BatchAccountOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config @@ -162,7 +162,7 @@ def get_long_running_output(response): create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} def update( - self, resource_group_name, account_name, tags=None, auto_storage=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): """Updates the properties of an existing Batch account. :param resource_group_name: The name of the resource group that @@ -170,11 +170,9 @@ def update( :type resource_group_name: str :param account_name: The name of the Batch account. :type account_name: str - :param tags: The user-specified tags associated with the account. - :type tags: dict[str, str] - :param auto_storage: The properties related to the auto-storage - account. - :type auto_storage: ~azure.mgmt.batch.models.AutoStorageBaseProperties + :param parameters: Additional parameters for account update. + :type parameters: + ~azure.mgmt.batch.models.BatchAccountUpdateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -185,8 +183,6 @@ def update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.BatchAccountUpdateParameters(tags=tags, auto_storage=auto_storage) - # Construct URL url = self.update.metadata['url'] path_format_arguments = { diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py index bc4f7f255a67..6d357ce119e2 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_certificate_operations.py @@ -27,7 +27,7 @@ class CertificateOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py index 34583d2e00ea..496ce264675e 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_location_operations.py @@ -25,7 +25,7 @@ class LocationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py index 4e1e91a8137b..ac98f174bab3 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py index c71a00c49bf3..0c441aa1564c 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_pool_operations.py @@ -27,7 +27,7 @@ class PoolOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_endpoint_connection_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_endpoint_connection_operations.py index 3691ba99ac03..5de2f1361ced 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_endpoint_connection_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_endpoint_connection_operations.py @@ -27,7 +27,7 @@ class PrivateEndpointConnectionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_link_resource_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_link_resource_operations.py index c1022230cd6d..ede068c750d7 100644 --- a/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_link_resource_operations.py +++ b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_private_link_resource_operations.py @@ -25,7 +25,7 @@ class PrivateLinkResourceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2020-03-01". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-05-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-03-01" + self.api_version = "2020-05-01" self.config = config diff --git a/sdk/batch/azure-mgmt-batch/setup.py b/sdk/batch/azure-mgmt-batch/setup.py index 74fcd7e2a6e4..ee27a043af4f 100644 --- a/sdk/batch/azure-mgmt-batch/setup.py +++ b/sdk/batch/azure-mgmt-batch/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,