From ddf8da5a3d6e480f8c2a397ac8ef023051545cd8 Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Wed, 4 Mar 2020 04:17:56 +0000 Subject: [PATCH] Generated from 94a4a9a77d4b638b69dee0099777d5b07d17e397 New update --- .../azure/mgmt/batch/models/__init__.py | 12 +- .../azure/mgmt/batch/models/_models.py | 178 +++++++++-------- .../azure/mgmt/batch/models/_models_py3.py | 180 +++++++++--------- .../azure/mgmt/batch/models/_paged_models.py | 10 - .../_application_package_operations.py | 9 +- .../operations/_batch_account_operations.py | 64 +------ 6 files changed, 185 insertions(+), 268 deletions(-) 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 0e44daa97447..746147c98ce4 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 @@ -28,13 +28,13 @@ from ._models_py3 import BatchAccountRegenerateKeyParameters from ._models_py3 import BatchAccountUpdateParameters from ._models_py3 import BatchLocationQuota + from ._models_py3 import CIFSMountConfiguration from ._models_py3 import Certificate from ._models_py3 import CertificateBaseProperties from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateReference from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import CheckNameAvailabilityResult - from ._models_py3 import CIFSMountConfiguration from ._models_py3 import CloudServiceConfiguration from ._models_py3 import ContainerConfiguration from ._models_py3 import ContainerRegistry @@ -49,9 +49,9 @@ from ._models_py3 import LinuxUserConfiguration from ._models_py3 import MetadataItem from ._models_py3 import MountConfiguration + from ._models_py3 import NFSMountConfiguration from ._models_py3 import NetworkConfiguration from ._models_py3 import NetworkSecurityGroupRule - from ._models_py3 import NFSMountConfiguration from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import Pool @@ -90,13 +90,13 @@ from ._models import BatchAccountRegenerateKeyParameters from ._models import BatchAccountUpdateParameters from ._models import BatchLocationQuota + from ._models import CIFSMountConfiguration from ._models import Certificate from ._models import CertificateBaseProperties from ._models import CertificateCreateOrUpdateParameters from ._models import CertificateReference from ._models import CheckNameAvailabilityParameters from ._models import CheckNameAvailabilityResult - from ._models import CIFSMountConfiguration from ._models import CloudServiceConfiguration from ._models import ContainerConfiguration from ._models import ContainerRegistry @@ -111,9 +111,9 @@ from ._models import LinuxUserConfiguration from ._models import MetadataItem from ._models import MountConfiguration + from ._models import NFSMountConfiguration from ._models import NetworkConfiguration from ._models import NetworkSecurityGroupRule - from ._models import NFSMountConfiguration from ._models import Operation from ._models import OperationDisplay from ._models import Pool @@ -183,13 +183,13 @@ 'BatchAccountRegenerateKeyParameters', 'BatchAccountUpdateParameters', 'BatchLocationQuota', + 'CIFSMountConfiguration', 'Certificate', 'CertificateBaseProperties', 'CertificateCreateOrUpdateParameters', 'CertificateReference', 'CheckNameAvailabilityParameters', 'CheckNameAvailabilityResult', - 'CIFSMountConfiguration', 'CloudServiceConfiguration', 'ContainerConfiguration', 'ContainerRegistry', @@ -204,9 +204,9 @@ 'LinuxUserConfiguration', 'MetadataItem', 'MountConfiguration', + 'NFSMountConfiguration', 'NetworkConfiguration', 'NetworkSecurityGroupRule', - 'NFSMountConfiguration', 'Operation', 'OperationDisplay', 'Pool', 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 0ebe8628f102..758134e9b05c 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 @@ -458,11 +458,6 @@ class AzureFileShareConfiguration(Model): :type azure_file_url: str :param account_key: Required. The Azure Storage account key. :type account_key: str - :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: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. @@ -473,14 +468,12 @@ class AzureFileShareConfiguration(Model): 'account_name': {'required': True}, 'azure_file_url': {'required': True}, 'account_key': {'required': True}, - 'relative_mount_path': {'required': True}, } _attribute_map = { 'account_name': {'key': 'accountName', 'type': 'str'}, 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, 'mount_options': {'key': 'mountOptions', 'type': 'str'}, } @@ -489,7 +482,6 @@ def __init__(self, **kwargs): self.account_name = kwargs.get('account_name', None) self.azure_file_url = kwargs.get('azure_file_url', None) self.account_key = kwargs.get('account_key', None) - self.relative_mount_path = kwargs.get('relative_mount_path', None) self.mount_options = kwargs.get('mount_options', None) @@ -802,6 +794,54 @@ def __init__(self, **kwargs): self.account_quota = None +class CIFSMountConfiguration(Model): + """Information used to connect to a CIFS file system. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :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: 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. The password to use for authentication against + the CIFS file system. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) + self.password = kwargs.get('password', None) + + class Certificate(ProxyResource): """Contains information about a certificate. @@ -1109,54 +1149,6 @@ def __init__(self, **kwargs): self.message = None -class CIFSMountConfiguration(Model): - """Information used to connect to a CIFS file system. - - All required parameters must be populated in order to send to Azure. - - :param username: Required. The user to use for authentication against the - CIFS file system. - :type username: str - :param source: Required. The URI of the file system to mount. - :type source: str - :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: 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. The password to use for authentication against - the CIFS file system. - :type password: str - """ - - _validation = { - 'username': {'required': True}, - 'source': {'required': True}, - 'relative_mount_path': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'username': {'key': 'username', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, - 'mount_options': {'key': 'mountOptions', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CIFSMountConfiguration, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.source = kwargs.get('source', None) - self.relative_mount_path = kwargs.get('relative_mount_path', None) - self.mount_options = kwargs.get('mount_options', None) - self.password = kwargs.get('password', None) - - class CloudError(Model): """An error response from the Batch service. @@ -1770,6 +1762,42 @@ def __init__(self, **kwargs): self.azure_file_share_configuration = kwargs.get('azure_file_share_configuration', None) +class NFSMountConfiguration(Model): + """Information used to connect to an NFS file system. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :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: 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 + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.relative_mount_path = kwargs.get('relative_mount_path', None) + self.mount_options = kwargs.get('mount_options', None) + + class NetworkConfiguration(Model): """The network configuration for a pool. @@ -1879,42 +1907,6 @@ def __init__(self, **kwargs): self.source_port_ranges = kwargs.get('source_port_ranges', None) -class NFSMountConfiguration(Model): - """Information used to connect to an NFS file system. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. The URI of the file system to mount. - :type source: str - :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: 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 - """ - - _validation = { - 'source': {'required': True}, - 'relative_mount_path': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, - 'mount_options': {'key': 'mountOptions', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NFSMountConfiguration, self).__init__(**kwargs) - self.source = kwargs.get('source', None) - self.relative_mount_path = kwargs.get('relative_mount_path', None) - self.mount_options = kwargs.get('mount_options', None) - - class Operation(Model): """A REST API operation. @@ -2015,7 +2007,7 @@ class Pool(ProxyResource): 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 - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + (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 Virtual Machines Marketplace (pools created with 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 fe783b11ca84..e615a05da377 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 @@ -458,11 +458,6 @@ class AzureFileShareConfiguration(Model): :type azure_file_url: str :param account_key: Required. The Azure Storage account key. :type account_key: str - :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: Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. @@ -473,23 +468,20 @@ class AzureFileShareConfiguration(Model): 'account_name': {'required': True}, 'azure_file_url': {'required': True}, 'account_key': {'required': True}, - 'relative_mount_path': {'required': True}, } _attribute_map = { 'account_name': {'key': 'accountName', 'type': 'str'}, 'azure_file_url': {'key': 'azureFileUrl', 'type': 'str'}, 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, 'mount_options': {'key': 'mountOptions', 'type': 'str'}, } - def __init__(self, *, account_name: str, azure_file_url: str, account_key: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + def __init__(self, *, account_name: str, azure_file_url: str, account_key: str, mount_options: str=None, **kwargs) -> None: super(AzureFileShareConfiguration, self).__init__(**kwargs) self.account_name = account_name self.azure_file_url = azure_file_url self.account_key = account_key - self.relative_mount_path = relative_mount_path self.mount_options = mount_options @@ -802,6 +794,54 @@ def __init__(self, **kwargs) -> None: self.account_quota = None +class CIFSMountConfiguration(Model): + """Information used to connect to a CIFS file system. + + All required parameters must be populated in order to send to Azure. + + :param username: Required. The user to use for authentication against the + CIFS file system. + :type username: str + :param source: Required. The URI of the file system to mount. + :type source: str + :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: 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. The password to use for authentication against + the CIFS file system. + :type password: str + """ + + _validation = { + 'username': {'required': True}, + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str, source: str, relative_mount_path: str, password: str, mount_options: str=None, **kwargs) -> None: + super(CIFSMountConfiguration, self).__init__(**kwargs) + self.username = username + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options + self.password = password + + class Certificate(ProxyResource): """Contains information about a certificate. @@ -1109,54 +1149,6 @@ def __init__(self, **kwargs) -> None: self.message = None -class CIFSMountConfiguration(Model): - """Information used to connect to a CIFS file system. - - All required parameters must be populated in order to send to Azure. - - :param username: Required. The user to use for authentication against the - CIFS file system. - :type username: str - :param source: Required. The URI of the file system to mount. - :type source: str - :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: 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. The password to use for authentication against - the CIFS file system. - :type password: str - """ - - _validation = { - 'username': {'required': True}, - 'source': {'required': True}, - 'relative_mount_path': {'required': True}, - 'password': {'required': True}, - } - - _attribute_map = { - 'username': {'key': 'username', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, - 'mount_options': {'key': 'mountOptions', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, *, username: str, source: str, relative_mount_path: str, password: str, mount_options: str=None, **kwargs) -> None: - super(CIFSMountConfiguration, self).__init__(**kwargs) - self.username = username - self.source = source - self.relative_mount_path = relative_mount_path - self.mount_options = mount_options - self.password = password - - class CloudError(Model): """An error response from the Batch service. @@ -1770,6 +1762,42 @@ def __init__(self, *, azure_blob_file_system_configuration=None, nfs_mount_confi self.azure_file_share_configuration = azure_file_share_configuration +class NFSMountConfiguration(Model): + """Information used to connect to an NFS file system. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The URI of the file system to mount. + :type source: str + :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: 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 + """ + + _validation = { + 'source': {'required': True}, + 'relative_mount_path': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, + 'mount_options': {'key': 'mountOptions', 'type': 'str'}, + } + + def __init__(self, *, source: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: + super(NFSMountConfiguration, self).__init__(**kwargs) + self.source = source + self.relative_mount_path = relative_mount_path + self.mount_options = mount_options + + class NetworkConfiguration(Model): """The network configuration for a pool. @@ -1879,42 +1907,6 @@ def __init__(self, *, priority: int, access, source_address_prefix: str, source_ self.source_port_ranges = source_port_ranges -class NFSMountConfiguration(Model): - """Information used to connect to an NFS file system. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. The URI of the file system to mount. - :type source: str - :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: 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 - """ - - _validation = { - 'source': {'required': True}, - 'relative_mount_path': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'relative_mount_path': {'key': 'relativeMountPath', 'type': 'str'}, - 'mount_options': {'key': 'mountOptions', 'type': 'str'}, - } - - def __init__(self, *, source: str, relative_mount_path: str, mount_options: str=None, **kwargs) -> None: - super(NFSMountConfiguration, self).__init__(**kwargs) - self.source = source - self.relative_mount_path = relative_mount_path - self.mount_options = mount_options - - class Operation(Model): """A REST API operation. @@ -2015,7 +2007,7 @@ class Pool(ProxyResource): 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 - (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). + (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 Virtual Machines Marketplace (pools created with 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 1eb94dd020cd..1865025a41f0 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 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_package_operations.py b/sdk/batch/azure-mgmt-batch/azure/mgmt/batch/operations/_application_package_operations.py index 6e125e1993cf..8b0dbba3af85 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 @@ -41,7 +41,9 @@ def __init__(self, client, config, serializer, deserializer): def activate( self, resource_group_name, account_name, application_name, version_name, format, custom_headers=None, raw=False, **operation_config): - """Activates the specified application package. + """Activates the specified application package. This should be done after + the `ApplicationPackage` was created and uploaded. This needs to be + done before an `ApplicationPackage` can be used on Pools or Tasks. :param resource_group_name: The name of the resource group that contains the Batch account. @@ -118,7 +120,10 @@ def activate( def create( self, resource_group_name, account_name, application_name, version_name, custom_headers=None, raw=False, **operation_config): - """Creates an application package record. + """Creates an application package record. The record contains the SAS + where the package should be uploaded to. Once it is uploaded the + `ApplicationPackage` needs to be activated using + `ApplicationPackageActive` before it can be used. :param resource_group_name: The name of the resource group that contains the Batch account. 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 936fb33a68c9..16f6e285f5b6 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 @@ -99,7 +99,7 @@ def _create_initial( def create( self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new Batch account with the specified parameters. Existing + """!!!Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API. @@ -323,68 +323,6 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} - def get( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Gets information about the specified Batch account. - - :param resource_group_name: The name of the resource group that - contains the Batch account. - :type resource_group_name: str - :param account_name: The name of the Batch account. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BatchAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.batch.models.BatchAccount or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BatchAccount', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'} - def list( self, custom_headers=None, raw=False, **operation_config): """Gets information about the Batch accounts associated with the