diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/build.json b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/build.json new file mode 100644 index 000000000000..556ad30254a7 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/build.json @@ -0,0 +1,425 @@ +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4228", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_shasum": "b3897b8615417aa07cf9113d4bd18862b32f82f8", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4228", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.2578.936157981542.personal-lock", + "options": { + "port": 46012, + "host": "2130723326", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2578.936157981542.personal-lock:46012" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4231", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_shasum": "fa1b2b50cdd91bec9f04542420c3056eda202b87", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4231", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.2578.936157981542.personal-lock", + "options": { + "port": 46012, + "host": "2130723326", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2578.936157981542.personal-lock:46012" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.2578.936157981542.personal-lock", + "options": { + "port": 46012, + "host": "2130723326", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2578.936157981542.personal-lock:46012" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.3.38", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.2578.936157981542.personal-lock", + "options": { + "port": 46012, + "host": "2130723326", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2578.936157981542.personal-lock:46012" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.1.34", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^2.3.13", + "autorest": "^2.0.4203", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_shasum": "b58d7e0542e081cf410fdbcdf8c14acf9cee16a7", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.1.34", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.2578.936157981542.personal-lock", + "options": { + "port": 46012, + "host": "2130723326", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2578.936157981542.personal-lock:46012" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} +} \ No newline at end of file diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/data_lake_analytics_catalog_management_client.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/data_lake_analytics_catalog_management_client.py index 729cf43a59b9..38400cfbc158 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/data_lake_analytics_catalog_management_client.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/data_lake_analytics_catalog_management_client.py @@ -9,6 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- +import warnings from msrest.service_client import ServiceClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration @@ -37,13 +38,11 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if adla_catalog_dns_suffix is None: raise ValueError("Parameter 'adla_catalog_dns_suffix' must not be None.") - if not isinstance(adla_catalog_dns_suffix, str): - raise TypeError("Parameter 'adla_catalog_dns_suffix' must be str.") base_url = 'https://{accountName}.{adlaCatalogDnsSuffix}' super(DataLakeAnalyticsCatalogManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('datalakeanalyticscatalogmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-datalake-analytics/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/__init__.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/__init__.py index 188e23fef42d..ddf39e7edca5 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/__init__.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/__init__.py @@ -9,6 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +from .acl_create_or_update_parameters import AclCreateOrUpdateParameters +from .acl_delete_parameters import AclDeleteParameters +from .acl import Acl +from .acl_list import AclList from .data_lake_analytics_catalog_secret_create_or_update_parameters import DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters from .data_lake_analytics_catalog_credential_create_parameters import DataLakeAnalyticsCatalogCredentialCreateParameters from .data_lake_analytics_catalog_credential_delete_parameters import DataLakeAnalyticsCatalogCredentialDeleteParameters @@ -56,10 +60,16 @@ from .usql_schema_paged import USqlSchemaPaged from .usql_database_paged import USqlDatabasePaged from .data_lake_analytics_catalog_management_client_enums import ( + AclType, + PermissionType, FileType, ) __all__ = [ + 'AclCreateOrUpdateParameters', + 'AclDeleteParameters', + 'Acl', + 'AclList', 'DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters', 'DataLakeAnalyticsCatalogCredentialCreateParameters', 'DataLakeAnalyticsCatalogCredentialDeleteParameters', @@ -106,5 +116,7 @@ 'USqlAssemblyClrPaged', 'USqlSchemaPaged', 'USqlDatabasePaged', + 'AclType', + 'PermissionType', 'FileType', ] diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl.py new file mode 100644 index 000000000000..fbc4d6f2f3ba --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Acl(Model): + """A Data Lake Analytics catalog access control list (ACL) entry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ace_type: the access control list (ACL) entry type. UserObj and + GroupObj denote the owning user and group, respectively. Possible values + include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group' + :vartype ace_type: str or + ~azure.mgmt.datalake.analytics.catalog.models.AclType + :ivar principal_id: the Azure AD object ID of the user or group being + specified in the access control list (ACL) entry. + :vartype principal_id: str + :ivar permission: the permission type of the access control list (ACL) + entry. Possible values include: 'None', 'Use', 'Create', 'Drop', 'Alter', + 'Write', 'All' + :vartype permission: str or + ~azure.mgmt.datalake.analytics.catalog.models.PermissionType + """ + + _validation = { + 'ace_type': {'readonly': True}, + 'principal_id': {'readonly': True}, + 'permission': {'readonly': True}, + } + + _attribute_map = { + 'ace_type': {'key': 'aceType', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'permission': {'key': 'permission', 'type': 'str'}, + } + + def __init__(self): + super(Acl, self).__init__() + self.ace_type = None + self.principal_id = None + self.permission = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_create_or_update_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_create_or_update_parameters.py new file mode 100644 index 000000000000..ddb9e68b76fc --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_create_or_update_parameters.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AclCreateOrUpdateParameters(Model): + """The parameters used to create or update an access control list (ACL) entry. + + :param ace_type: the access control list (ACL) entry type. UserObj and + GroupObj denote the owning user and group, respectively. Possible values + include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group' + :type ace_type: str or + ~azure.mgmt.datalake.analytics.catalog.models.AclType + :param principal_id: the Azure AD object ID of the user or group being + specified in the access control list (ACL) entry. + :type principal_id: str + :param permission: the permission type of the access control list (ACL) + entry. Possible values include: 'None', 'Use', 'Create', 'Drop', 'Alter', + 'Write', 'All' + :type permission: str or + ~azure.mgmt.datalake.analytics.catalog.models.PermissionType + """ + + _validation = { + 'ace_type': {'required': True}, + 'principal_id': {'required': True}, + 'permission': {'required': True}, + } + + _attribute_map = { + 'ace_type': {'key': 'aceType', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'permission': {'key': 'permission', 'type': 'str'}, + } + + def __init__(self, ace_type, principal_id, permission): + super(AclCreateOrUpdateParameters, self).__init__() + self.ace_type = ace_type + self.principal_id = principal_id + self.permission = permission diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_delete_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_delete_parameters.py new file mode 100644 index 000000000000..fa41a05a4b26 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_delete_parameters.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AclDeleteParameters(Model): + """The parameters used to delete an access control list (ACL) entry. + + :param ace_type: the access control list (ACL) entry type. UserObj and + GroupObj denote the owning user and group, respectively. Possible values + include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group' + :type ace_type: str or + ~azure.mgmt.datalake.analytics.catalog.models.AclType + :param principal_id: the Azure AD object ID of the user or group being + specified in the access control list (ACL) entry. + :type principal_id: str + """ + + _validation = { + 'ace_type': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'ace_type': {'key': 'aceType', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__(self, ace_type, principal_id): + super(AclDeleteParameters, self).__init__() + self.ace_type = ace_type + self.principal_id = principal_id diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_list.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_list.py new file mode 100644 index 000000000000..9009400a43d7 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_list.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AclList(Model): + """A Data Lake Analytics catalog access control list (ACL). + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: the access control list (ACL). + :vartype value: list[~azure.mgmt.datalake.analytics.catalog.models.Acl] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Acl]'}, + } + + def __init__(self): + super(AclList, self).__init__() + self.value = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item.py index cce66f94f3a4..23ec60d1d05c 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item.py @@ -27,5 +27,6 @@ class CatalogItem(Model): } def __init__(self, compute_account_name=None, version=None): + super(CatalogItem, self).__init__() self.compute_account_name = compute_account_name self.version = version diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item_list.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item_list.py index 6931091e6f8d..590dd1abf71a 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item_list.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/catalog_item_list.py @@ -24,4 +24,5 @@ class CatalogItemList(Model): } def __init__(self, next_link=None): + super(CatalogItemList, self).__init__() self.next_link = next_link diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_create_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_create_parameters.py index a82a7a43c0cb..35c7552cb2f0 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_create_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_create_parameters.py @@ -39,6 +39,7 @@ class DataLakeAnalyticsCatalogCredentialCreateParameters(Model): } def __init__(self, password, uri, user_id): + super(DataLakeAnalyticsCatalogCredentialCreateParameters, self).__init__() self.password = password self.uri = uri self.user_id = user_id diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_delete_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_delete_parameters.py index e4b9d7154ff1..91b13687ea70 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_delete_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_delete_parameters.py @@ -26,4 +26,5 @@ class DataLakeAnalyticsCatalogCredentialDeleteParameters(Model): } def __init__(self, password=None): + super(DataLakeAnalyticsCatalogCredentialDeleteParameters, self).__init__() self.password = password diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_update_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_update_parameters.py index 202db2061701..f12009cd4a72 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_update_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_credential_update_parameters.py @@ -38,6 +38,7 @@ class DataLakeAnalyticsCatalogCredentialUpdateParameters(Model): } def __init__(self, password=None, new_password=None, uri=None, user_id=None): + super(DataLakeAnalyticsCatalogCredentialUpdateParameters, self).__init__() self.password = password self.new_password = new_password self.uri = uri diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_management_client_enums.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_management_client_enums.py index ff37fe2c01c7..29e9f3109f69 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_management_client_enums.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_management_client_enums.py @@ -12,6 +12,26 @@ from enum import Enum +class AclType(Enum): + + user_obj = "UserObj" + group_obj = "GroupObj" + other = "Other" + user = "User" + group = "Group" + + +class PermissionType(Enum): + + none = "None" + use = "Use" + create = "Create" + drop = "Drop" + alter = "Alter" + write = "Write" + all = "All" + + class FileType(Enum): assembly = "Assembly" diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_secret_create_or_update_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_secret_create_or_update_parameters.py index 2be2b55ec3f0..b99dc9d57f24 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_secret_create_or_update_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/data_lake_analytics_catalog_secret_create_or_update_parameters.py @@ -34,5 +34,6 @@ class DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters(Model): } def __init__(self, password, uri=None): + super(DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters, self).__init__() self.password = password self.uri = uri diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/ddl_name.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/ddl_name.py index 9791ea31c7c2..12e0da950eac 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/ddl_name.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/ddl_name.py @@ -37,6 +37,7 @@ class DdlName(Model): } def __init__(self, first_part=None, second_part=None, third_part=None, server=None): + super(DdlName, self).__init__() self.first_part = first_part self.second_part = second_part self.third_part = third_part diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/entity_id.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/entity_id.py index bed40f424cd2..be36df614737 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/entity_id.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/entity_id.py @@ -17,8 +17,7 @@ class EntityId(Model): :param name: the name of the external table associated with this database, schema and table. - :type name: :class:`DdlName - ` + :type name: ~azure.mgmt.datalake.analytics.catalog.models.DdlName :param version: the version of the external data source. :type version: str """ @@ -29,5 +28,6 @@ class EntityId(Model): } def __init__(self, name=None, version=None): + super(EntityId, self).__init__() self.name = name self.version = version diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/external_table.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/external_table.py index b7443ffc35f3..a9defe163035 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/external_table.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/external_table.py @@ -19,8 +19,7 @@ class ExternalTable(Model): schema. :type table_name: str :param data_source: the data source associated with this external table. - :type data_source: :class:`EntityId - ` + :type data_source: ~azure.mgmt.datalake.analytics.catalog.models.EntityId """ _attribute_map = { @@ -29,5 +28,6 @@ class ExternalTable(Model): } def __init__(self, table_name=None, data_source=None): + super(ExternalTable, self).__init__() self.table_name = table_name self.data_source = data_source diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/type_field_info.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/type_field_info.py index 3f0b5c854bc3..bfdaee960702 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/type_field_info.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/type_field_info.py @@ -27,5 +27,6 @@ class TypeFieldInfo(Model): } def __init__(self, name=None, type=None): + super(TypeFieldInfo, self).__init__() self.name = name self.type = type diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly.py index ddca1d8d5971..8c2f96ea3152 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly.py @@ -32,11 +32,11 @@ class USqlAssembly(CatalogItem): defined or not. :type is_user_defined: bool :param files: the list of files associated with the assembly - :type files: list of :class:`USqlAssemblyFileInfo - ` + :type files: + list[~azure.mgmt.datalake.analytics.catalog.models.USqlAssemblyFileInfo] :param dependencies: the list of dependencies associated with the assembly - :type dependencies: list of :class:`USqlAssemblyDependencyInfo - ` + :type dependencies: + list[~azure.mgmt.datalake.analytics.catalog.models.USqlAssemblyDependencyInfo] """ _attribute_map = { diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_dependency_info.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_dependency_info.py index 5517879e36a2..9e67a40ed60a 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_dependency_info.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_dependency_info.py @@ -16,8 +16,7 @@ class USqlAssemblyDependencyInfo(Model): """A Data Lake Analytics catalog U-SQL dependency information item. :param entity_id: the EntityId of the dependency. - :type entity_id: :class:`EntityId - ` + :type entity_id: ~azure.mgmt.datalake.analytics.catalog.models.EntityId """ _attribute_map = { @@ -25,4 +24,5 @@ class USqlAssemblyDependencyInfo(Model): } def __init__(self, entity_id=None): + super(USqlAssemblyDependencyInfo, self).__init__() self.entity_id = entity_id diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_file_info.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_file_info.py index 39c9f0f1f741..6b88668fadb7 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_file_info.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_assembly_file_info.py @@ -17,8 +17,7 @@ class USqlAssemblyFileInfo(Model): :param type: the assembly file type. Possible values include: 'Assembly', 'Resource', 'Nodeploy' - :type type: str or :class:`FileType - ` + :type type: str or ~azure.mgmt.datalake.analytics.catalog.models.FileType :param original_path: the the original path to the assembly file. :type original_path: str :param content_path: the the content path to the assembly file. @@ -32,6 +31,7 @@ class USqlAssemblyFileInfo(Model): } def __init__(self, type=None, original_path=None, content_path=None): + super(USqlAssemblyFileInfo, self).__init__() self.type = type self.original_path = original_path self.content_path = content_path diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_directed_column.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_directed_column.py index 2e271cbeca15..9ac9ec6aa4b9 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_directed_column.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_directed_column.py @@ -28,5 +28,6 @@ class USqlDirectedColumn(Model): } def __init__(self, name=None, descending=None): + super(USqlDirectedColumn, self).__init__() self.name = name self.descending = descending diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_distribution_info.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_distribution_info.py index ffc0f7a5794d..46c47230d143 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_distribution_info.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_distribution_info.py @@ -18,8 +18,8 @@ class USqlDistributionInfo(Model): :param type: the type of this distribution. :type type: int :param keys: the list of directed columns in the distribution - :type keys: list of :class:`USqlDirectedColumn - ` + :type keys: + list[~azure.mgmt.datalake.analytics.catalog.models.USqlDirectedColumn] :param count: the count of indices using this distribution. :type count: int :param dynamic_count: the dynamic count of indices using this @@ -35,6 +35,7 @@ class USqlDistributionInfo(Model): } def __init__(self, type=None, keys=None, count=None, dynamic_count=None): + super(USqlDistributionInfo, self).__init__() self.type = type self.keys = keys self.count = count diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_external_data_source.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_external_data_source.py index 56f1934350c9..524e08b35984 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_external_data_source.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_external_data_source.py @@ -30,7 +30,7 @@ class USqlExternalDataSource(CatalogItem): :type provider_string: str :param pushdown_types: the list of types to push down from the external data source. - :type pushdown_types: list of str + :type pushdown_types: list[str] """ _attribute_map = { diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_index.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_index.py index f57608b7246b..0a7ea50f05f0 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_index.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_index.py @@ -18,20 +18,20 @@ class USqlIndex(Model): :param name: the name of the index in the table. :type name: str :param index_keys: the list of directed columns in the index - :type index_keys: list of :class:`USqlDirectedColumn - ` + :type index_keys: + list[~azure.mgmt.datalake.analytics.catalog.models.USqlDirectedColumn] :param columns: the list of columns in the index - :type columns: list of str + :type columns: list[str] :param distribution_info: the distributions info of the index - :type distribution_info: :class:`USqlDistributionInfo - ` + :type distribution_info: + ~azure.mgmt.datalake.analytics.catalog.models.USqlDistributionInfo :param partition_function: partition function ID for the index. :type partition_function: str :param partition_key_list: the list of partion keys in the index - :type partition_key_list: list of str + :type partition_key_list: list[str] :param stream_names: the list of full paths to the streams that contain this index in the DataLake account. - :type stream_names: list of str + :type stream_names: list[str] :param is_columnstore: the switch indicating if this index is a columnstore index. :type is_columnstore: bool @@ -55,6 +55,7 @@ class USqlIndex(Model): } def __init__(self, name=None, index_keys=None, columns=None, distribution_info=None, partition_function=None, partition_key_list=None, stream_names=None, is_columnstore=None, index_id=None, is_unique=None): + super(USqlIndex, self).__init__() self.name = name self.index_keys = index_keys self.columns = columns diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table.py index 6a0c0bde8714..93abe1c000ca 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table.py @@ -27,19 +27,19 @@ class USqlTable(CatalogItem): :param name: the name of the table. :type name: str :param column_list: the list of columns in this table - :type column_list: list of :class:`USqlTableColumn - ` + :type column_list: + list[~azure.mgmt.datalake.analytics.catalog.models.USqlTableColumn] :param index_list: the list of indices in this table - :type index_list: list of :class:`USqlIndex - ` + :type index_list: + list[~azure.mgmt.datalake.analytics.catalog.models.USqlIndex] :param partition_key_list: the list of partition keys in the table - :type partition_key_list: list of str + :type partition_key_list: list[str] :param external_table: the external table associated with the table. - :type external_table: :class:`ExternalTable - ` + :type external_table: + ~azure.mgmt.datalake.analytics.catalog.models.ExternalTable :param distribution_info: the distributions info of the table - :type distribution_info: :class:`USqlDistributionInfo - ` + :type distribution_info: + ~azure.mgmt.datalake.analytics.catalog.models.USqlDistributionInfo """ _attribute_map = { diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_column.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_column.py index 0eed3e31817b..07807ab36444 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_column.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_column.py @@ -28,5 +28,6 @@ class USqlTableColumn(Model): } def __init__(self, name=None, type=None): + super(USqlTableColumn, self).__init__() self.name = name self.type = type diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_partition.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_partition.py index 82c554ffcf3b..e5dad9babe90 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_partition.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_partition.py @@ -27,12 +27,11 @@ class USqlTablePartition(CatalogItem): :param name: the name of the table partition. :type name: str :param parent_name: the Ddl object of the partition's parent. - :type parent_name: :class:`DdlName - ` + :type parent_name: ~azure.mgmt.datalake.analytics.catalog.models.DdlName :param index_id: the index ID for this partition. :type index_id: int :param label: the list of labels associated with this partition. - :type label: list of str + :type label: list[str] :param create_date: the creation time of the partition :type create_date: datetime """ diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_statistics.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_statistics.py index d25e5f784501..4846d5f3c994 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_statistics.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_statistics.py @@ -49,7 +49,7 @@ class USqlTableStatistics(CatalogItem): :type filter_definition: str :param col_names: the list of column names associated with these statistics. - :type col_names: list of str + :type col_names: list[str] """ _attribute_map = { diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_type.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_type.py index d2a473fb05e8..588c4b1bbe2b 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_type.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_table_type.py @@ -58,8 +58,8 @@ class USqlTableType(USqlType): complex type. :type is_complex_type: bool :ivar columns: the type field information associated with this table type. - :vartype columns: list of :class:`TypeFieldInfo - ` + :vartype columns: + list[~azure.mgmt.datalake.analytics.catalog.models.TypeFieldInfo] """ _validation = { diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/operations/catalog_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/operations/catalog_operations.py index f4b47017681e..a51f609fd078 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/operations/catalog_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/operations/catalog_operations.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- import uuid +import warnings from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError @@ -26,6 +27,8 @@ class CatalogOperations(object): :ivar api_version: Client Api Version. Constant value: "2016-11-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -41,6 +44,9 @@ def create_secret( specified database. This is deprecated and will be removed in the next release. Please use CreateCredential instead. + .. warning:: + This method is deprecated + :param account_name: The Azure Data Lake Analytics account upon which to execute catalog operations. :type account_name: str @@ -59,13 +65,11 @@ def create_secret( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + warnings.warn("Method create_secret is deprecated", DeprecationWarning) parameters = models.DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters(password=password, uri=uri) # Construct URL @@ -98,7 +102,7 @@ def create_secret( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -115,6 +119,9 @@ def update_secret( specified database. This is deprecated and will be removed in the next release. Please use UpdateCredential instead. + .. warning:: + This method is deprecated + :param account_name: The Azure Data Lake Analytics account upon which to execute catalog operations. :type account_name: str @@ -132,13 +139,11 @@ def update_secret( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + warnings.warn("Method update_secret is deprecated", DeprecationWarning) parameters = models.DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters(password=password, uri=uri) # Construct URL @@ -171,7 +176,7 @@ def update_secret( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -188,6 +193,9 @@ def delete_secret( deprecated and will be removed in the next release. Please use DeleteCredential instead. + .. warning:: + This method is deprecated + :param account_name: The Azure Data Lake Analytics account upon which to execute catalog operations. :type account_name: str @@ -200,13 +208,11 @@ def delete_secret( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + warnings.warn("Method delete_secret is deprecated", DeprecationWarning) # Construct URL url = '/catalog/usql/databases/{databaseName}/secrets/{secretName}' path_format_arguments = { @@ -233,7 +239,7 @@ def delete_secret( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -250,6 +256,9 @@ def get_secret( and will be removed in the next release. Please use GetCredential instead. + .. warning:: + This method is deprecated + :param account_name: The Azure Data Lake Analytics account upon which to execute catalog operations. :type account_name: str @@ -262,15 +271,12 @@ def get_secret( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlSecret - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlSecret - ` or - :class:`ClientRawResponse` + :return: USqlSecret or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlSecret or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + warnings.warn("Method get_secret is deprecated", DeprecationWarning) # Construct URL url = '/catalog/usql/databases/{databaseName}/secrets/{secretName}' path_format_arguments = { @@ -297,7 +303,7 @@ def get_secret( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -321,6 +327,9 @@ def delete_all_secrets( will be removed in the next release. In the future, please only drop individual credentials using DeleteCredential. + .. warning:: + This method is deprecated + :param account_name: The Azure Data Lake Analytics account upon which to execute catalog operations. :type account_name: str @@ -331,13 +340,11 @@ def delete_all_secrets( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + warnings.warn("Method delete_all_secrets is deprecated", DeprecationWarning) # Construct URL url = '/catalog/usql/databases/{databaseName}/secrets' path_format_arguments = { @@ -363,7 +370,7 @@ def delete_all_secrets( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -392,18 +399,14 @@ def create_credential( :param parameters: The parameters required to create the credential (name and password) :type parameters: - :class:`DataLakeAnalyticsCatalogCredentialCreateParameters - ` + ~azure.mgmt.datalake.analytics.catalog.models.DataLakeAnalyticsCatalogCredentialCreateParameters :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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -436,7 +439,7 @@ def create_credential( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -463,18 +466,14 @@ def update_credential( :param parameters: The parameters required to modify the credential (name and password) :type parameters: - :class:`DataLakeAnalyticsCatalogCredentialUpdateParameters - ` + ~azure.mgmt.datalake.analytics.catalog.models.DataLakeAnalyticsCatalogCredentialUpdateParameters :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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -507,7 +506,7 @@ def update_credential( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -544,11 +543,8 @@ def delete_credential( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = None @@ -590,7 +586,7 @@ def delete_credential( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -618,13 +614,9 @@ def get_credential( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlCredential - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlCredential - ` or - :class:`ClientRawResponse` + :return: USqlCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlCredential + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -653,7 +645,7 @@ def get_credential( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -705,10 +697,9 @@ def list_credentials( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlCredential - ` - :rtype: :class:`USqlCredentialPaged - ` + :return: An iterator like instance of USqlCredential + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlCredentialPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlCredential] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -756,7 +747,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -794,13 +785,10 @@ def get_external_data_source( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlExternalDataSource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlExternalDataSource - ` - or :class:`ClientRawResponse` + :return: USqlExternalDataSource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlExternalDataSource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -829,7 +817,7 @@ def get_external_data_source( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -883,10 +871,9 @@ def list_external_data_sources( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlExternalDataSource - ` - :rtype: :class:`USqlExternalDataSourcePaged - ` + :return: An iterator like instance of USqlExternalDataSource + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlExternalDataSourcePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlExternalDataSource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -934,7 +921,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -972,13 +959,9 @@ def get_procedure( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlProcedure - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlProcedure - ` or - :class:`ClientRawResponse` + :return: USqlProcedure or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlProcedure or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1008,7 +991,7 @@ def get_procedure( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1063,10 +1046,9 @@ def list_procedures( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlProcedure - ` - :rtype: :class:`USqlProcedurePaged - ` + :return: An iterator like instance of USqlProcedure + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlProcedurePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlProcedure] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1115,7 +1097,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1152,13 +1134,9 @@ def get_table( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlTable - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlTable - ` or - :class:`ClientRawResponse` + :return: USqlTable or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlTable or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1188,7 +1166,7 @@ def get_table( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1248,10 +1226,9 @@ def list_tables( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTable - ` - :rtype: :class:`USqlTablePaged - ` + :return: An iterator like instance of USqlTable + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTablePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTable] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1302,7 +1279,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1359,10 +1336,9 @@ def list_table_statistics_by_database_and_schema( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTableStatistics - ` - :rtype: :class:`USqlTableStatisticsPaged - ` + :return: An iterator like instance of USqlTableStatistics + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableStatisticsPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTableStatistics] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1411,7 +1387,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1450,13 +1426,9 @@ def get_table_type( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlTableType - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlTableType - ` or - :class:`ClientRawResponse` + :return: USqlTableType or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlTableType or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1486,7 +1458,7 @@ def get_table_type( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1541,10 +1513,9 @@ def list_table_types( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTableType - ` - :rtype: :class:`USqlTableTypePaged - ` + :return: An iterator like instance of USqlTableType + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableTypePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTableType] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1593,7 +1564,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1630,13 +1601,9 @@ def get_package( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlPackage - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlPackage - ` or - :class:`ClientRawResponse` + :return: USqlPackage or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlPackage or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1666,7 +1633,7 @@ def get_package( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1721,10 +1688,9 @@ def list_packages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlPackage - ` - :rtype: :class:`USqlPackagePaged - ` + :return: An iterator like instance of USqlPackage + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlPackagePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlPackage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1773,7 +1739,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1810,13 +1776,9 @@ def get_view( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlView - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlView - ` or - :class:`ClientRawResponse` + :return: USqlView or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlView or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1846,7 +1808,7 @@ def get_view( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1900,10 +1862,9 @@ def list_views( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlView - ` - :rtype: :class:`USqlViewPaged - ` + :return: An iterator like instance of USqlView + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlViewPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlView] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1952,7 +1913,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1993,13 +1954,10 @@ def get_table_statistic( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlTableStatistics - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlTableStatistics - ` or - :class:`ClientRawResponse` + :return: USqlTableStatistics or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableStatistics or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2030,7 +1988,7 @@ def get_table_statistic( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2088,10 +2046,9 @@ def list_table_statistics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTableStatistics - ` - :rtype: :class:`USqlTableStatisticsPaged - ` + :return: An iterator like instance of USqlTableStatistics + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableStatisticsPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTableStatistics] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2141,7 +2098,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2182,13 +2139,10 @@ def get_table_partition( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlTablePartition - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlTablePartition - ` or - :class:`ClientRawResponse` + :return: USqlTablePartition or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTablePartition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2219,7 +2173,7 @@ def get_table_partition( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2277,10 +2231,9 @@ def list_table_partitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTablePartition - ` - :rtype: :class:`USqlTablePartitionPaged - ` + :return: An iterator like instance of USqlTablePartition + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTablePartitionPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTablePartition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2330,7 +2283,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2386,10 +2339,9 @@ def list_types( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlType - ` - :rtype: :class:`USqlTypePaged - ` + :return: An iterator like instance of USqlType + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTypePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlType] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2438,7 +2390,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2479,13 +2431,10 @@ def get_table_valued_function( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlTableValuedFunction - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlTableValuedFunction - ` - or :class:`ClientRawResponse` + :return: USqlTableValuedFunction or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableValuedFunction + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2515,7 +2464,7 @@ def get_table_valued_function( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2572,10 +2521,9 @@ def list_table_valued_functions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTableValuedFunction - ` - :rtype: :class:`USqlTableValuedFunctionPaged - ` + :return: An iterator like instance of USqlTableValuedFunction + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableValuedFunctionPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTableValuedFunction] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2624,7 +2572,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2660,13 +2608,9 @@ def get_assembly( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlAssembly - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlAssembly - ` or - :class:`ClientRawResponse` + :return: USqlAssembly or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlAssembly or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2695,7 +2639,7 @@ def get_assembly( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2748,10 +2692,9 @@ def list_assemblies( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlAssemblyClr - ` - :rtype: :class:`USqlAssemblyClrPaged - ` + :return: An iterator like instance of USqlAssemblyClr + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlAssemblyClrPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlAssemblyClr] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2799,7 +2742,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2834,13 +2777,9 @@ def get_schema( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlSchema - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlSchema - ` or - :class:`ClientRawResponse` + :return: USqlSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlSchema or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2869,7 +2808,7 @@ def get_schema( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2921,10 +2860,9 @@ def list_schemas( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlSchema - ` - :rtype: :class:`USqlSchemaPaged - ` + :return: An iterator like instance of USqlSchema + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlSchemaPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlSchema] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2972,7 +2910,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3027,10 +2965,9 @@ def list_table_statistics_by_database( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTableStatistics - ` - :rtype: :class:`USqlTableStatisticsPaged - ` + :return: An iterator like instance of USqlTableStatistics + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableStatisticsPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTableStatistics] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -3078,7 +3015,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3137,10 +3074,9 @@ def list_tables_by_database( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTable - ` - :rtype: :class:`USqlTablePaged - ` + :return: An iterator like instance of USqlTable + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTablePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTable] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -3190,7 +3126,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3245,10 +3181,9 @@ def list_table_valued_functions_by_database( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlTableValuedFunction - ` - :rtype: :class:`USqlTableValuedFunctionPaged - ` + :return: An iterator like instance of USqlTableValuedFunction + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlTableValuedFunctionPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlTableValuedFunction] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -3296,7 +3231,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3350,10 +3285,9 @@ def list_views_by_database( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlView - ` - :rtype: :class:`USqlViewPaged - ` + :return: An iterator like instance of USqlView + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlViewPaged[~azure.mgmt.datalake.analytics.catalog.models.USqlView] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -3401,7 +3335,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3420,6 +3354,193 @@ def internal_paging(next_link=None, raw=False): return deserialized + def list_acls_by_database( + self, account_name, database_name, filter=None, top=None, skip=None, select=None, orderby=None, count=None, custom_headers=None, raw=False, **operation_config): + """Retrieves the list of access control list (ACL) entries for the + database from the Data Lake Analytics catalog. + + :param account_name: The Azure Data Lake Analytics account upon which + to execute catalog operations. + :type account_name: str + :param database_name: The name of the database. + :type database_name: str + :param filter: OData filter. Optional. + :type filter: str + :param top: The number of items to return. Optional. + :type top: int + :param skip: The number of items to skip over before returning + elements. Optional. + :type skip: int + :param select: OData Select statement. Limits the properties on each + entry to just those requested, e.g. + Categories?$select=CategoryName,Description. Optional. + :type select: str + :param orderby: OrderBy clause. One or more comma-separated + expressions with an optional "asc" (the default) or "desc" depending + on the order you'd like the values sorted, e.g. + Categories?$orderby=CategoryName desc. Optional. + :type orderby: str + :param count: The Boolean value of true or false to request a count of + the matching resources included with the resources in the response, + e.g. Categories?$count=true. Optional. + :type count: bool + :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: AclList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.AclList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/catalog/usql/databases/{databaseName}/acl' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaCatalogDnsSuffix': self._serialize.url("self.config.adla_catalog_dns_suffix", self.config.adla_catalog_dns_suffix, 'str', skip_quote=True), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=1) + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + if count is not None: + query_parameters['$count'] = self._serialize.query("count", count, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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) + response = self._client.send(request, header_parameters, 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('AclList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_acls( + self, account_name, filter=None, top=None, skip=None, select=None, orderby=None, count=None, custom_headers=None, raw=False, **operation_config): + """Retrieves the list of access control list (ACL) entries for the Data + Lake Analytics catalog. + + :param account_name: The Azure Data Lake Analytics account upon which + to execute catalog operations. + :type account_name: str + :param filter: OData filter. Optional. + :type filter: str + :param top: The number of items to return. Optional. + :type top: int + :param skip: The number of items to skip over before returning + elements. Optional. + :type skip: int + :param select: OData Select statement. Limits the properties on each + entry to just those requested, e.g. + Categories?$select=CategoryName,Description. Optional. + :type select: str + :param orderby: OrderBy clause. One or more comma-separated + expressions with an optional "asc" (the default) or "desc" depending + on the order you'd like the values sorted, e.g. + Categories?$orderby=CategoryName desc. Optional. + :type orderby: str + :param count: The Boolean value of true or false to request a count of + the matching resources included with the resources in the response, + e.g. Categories?$count=true. Optional. + :type count: bool + :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: AclList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.AclList or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/catalog/usql/acl' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaCatalogDnsSuffix': self._serialize.url("self.config.adla_catalog_dns_suffix", self.config.adla_catalog_dns_suffix, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', minimum=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=1) + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + if count is not None: + query_parameters['$count'] = self._serialize.query("count", count, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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) + response = self._client.send(request, header_parameters, 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('AclList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def get_database( self, account_name, database_name, custom_headers=None, raw=False, **operation_config): """Retrieves the specified database from the Data Lake Analytics catalog. @@ -3434,13 +3555,9 @@ def get_database( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`USqlDatabase - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`USqlDatabase - ` or - :class:`ClientRawResponse` + :return: USqlDatabase or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.catalog.models.USqlDatabase or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3468,7 +3585,7 @@ def get_database( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3518,10 +3635,9 @@ def list_databases( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`USqlDatabase - ` - :rtype: :class:`USqlDatabasePaged - ` + :return: An iterator like instance of USqlDatabase + :rtype: + ~azure.mgmt.datalake.analytics.catalog.models.USqlDatabasePaged[~azure.mgmt.datalake.analytics.catalog.models.USqlDatabase] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -3568,7 +3684,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3586,3 +3702,273 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + + def grant_acl_to_database( + self, account_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + """Grants an access control list (ACL) entry to the database from the Data + Lake Analytics catalog. + + :param account_name: The Azure Data Lake Analytics account upon which + to execute catalog operations. + :type account_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: Parameters supplied to create or update an access + control list (ACL) entry for a database. + :type parameters: + ~azure.mgmt.datalake.analytics.catalog.models.AclCreateOrUpdateParameters + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + op = "GRANTACE" + + # Construct URL + url = '/catalog/usql/databases/{databaseName}/acl' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaCatalogDnsSuffix': self._serialize.url("self.config.adla_catalog_dns_suffix", self.config.adla_catalog_dns_suffix, 'str', skip_quote=True), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['op'] = self._serialize.query("op", op, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AclCreateOrUpdateParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_acl_from_database( + self, account_name, database_name, ace_type, principal_id, custom_headers=None, raw=False, **operation_config): + """Revokes an access control list (ACL) entry for the database from the + Data Lake Analytics catalog. + + :param account_name: The Azure Data Lake Analytics account upon which + to execute catalog operations. + :type account_name: str + :param database_name: The name of the database. + :type database_name: str + :param ace_type: the access control list (ACL) entry type. UserObj and + GroupObj denote the owning user and group, respectively. Possible + values include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group' + :type ace_type: str or + ~azure.mgmt.datalake.analytics.catalog.models.AclType + :param principal_id: the Azure AD object ID of the user or group being + specified in the access control list (ACL) entry. + :type principal_id: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.AclDeleteParameters(ace_type=ace_type, principal_id=principal_id) + + op = "REVOKEACE" + + # Construct URL + url = '/catalog/usql/databases/{databaseName}/acl' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaCatalogDnsSuffix': self._serialize.url("self.config.adla_catalog_dns_suffix", self.config.adla_catalog_dns_suffix, 'str', skip_quote=True), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['op'] = self._serialize.query("op", op, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AclDeleteParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def grant_acl( + self, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """Grants an access control list (ACL) entry to the Data Lake Analytics + catalog. + + :param account_name: The Azure Data Lake Analytics account upon which + to execute catalog operations. + :type account_name: str + :param parameters: Parameters supplied to create or update an access + control list (ACL) entry for a Data Lake Analytics catalog. + :type parameters: + ~azure.mgmt.datalake.analytics.catalog.models.AclCreateOrUpdateParameters + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + op = "GRANTACE" + + # Construct URL + url = '/catalog/usql/acl' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaCatalogDnsSuffix': self._serialize.url("self.config.adla_catalog_dns_suffix", self.config.adla_catalog_dns_suffix, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['op'] = self._serialize.query("op", op, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AclCreateOrUpdateParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revoke_acl( + self, account_name, ace_type, principal_id, custom_headers=None, raw=False, **operation_config): + """Revokes an access control list (ACL) entry from the Data Lake Analytics + catalog. + + :param account_name: The Azure Data Lake Analytics account upon which + to execute catalog operations. + :type account_name: str + :param ace_type: the access control list (ACL) entry type. UserObj and + GroupObj denote the owning user and group, respectively. Possible + values include: 'UserObj', 'GroupObj', 'Other', 'User', 'Group' + :type ace_type: str or + ~azure.mgmt.datalake.analytics.catalog.models.AclType + :param principal_id: the Azure AD object ID of the user or group being + specified in the access control list (ACL) entry. + :type principal_id: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.AclDeleteParameters(ace_type=ace_type, principal_id=principal_id) + + op = "REVOKEACE" + + # Construct URL + url = '/catalog/usql/acl' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaCatalogDnsSuffix': self._serialize.url("self.config.adla_catalog_dns_suffix", self.config.adla_catalog_dns_suffix, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['op'] = self._serialize.query("op", op, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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 body + body_content = self._serialize.body(parameters, 'AclDeleteParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/version.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/version.py index 9a6b4374370f..3ac449b544e4 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/version.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.6" +VERSION = "2016-11-01" diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/data_lake_analytics_job_management_client.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/data_lake_analytics_job_management_client.py index d68073d125fe..704829a2d2e2 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/data_lake_analytics_job_management_client.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/data_lake_analytics_job_management_client.py @@ -27,8 +27,8 @@ class DataLakeAnalyticsJobManagementClientConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param adla_job_dns_suffix: Gets the DNS suffix used as the base for all - Azure Data Lake Analytics Job service requests. + :param adla_job_dns_suffix: The DNS suffix used as the base for all Azure + Data Lake Analytics Job service requests. :type adla_job_dns_suffix: str """ @@ -39,13 +39,11 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if adla_job_dns_suffix is None: raise ValueError("Parameter 'adla_job_dns_suffix' must not be None.") - if not isinstance(adla_job_dns_suffix, str): - raise TypeError("Parameter 'adla_job_dns_suffix' must be str.") base_url = 'https://{accountName}.{adlaJobDnsSuffix}' super(DataLakeAnalyticsJobManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('datalakeanalyticsjobmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-datalake-analytics/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials @@ -68,8 +66,8 @@ class DataLakeAnalyticsJobManagementClient(object): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param adla_job_dns_suffix: Gets the DNS suffix used as the base for all - Azure Data Lake Analytics Job service requests. + :param adla_job_dns_suffix: The DNS suffix used as the base for all Azure + Data Lake Analytics Job service requests. :type adla_job_dns_suffix: str """ @@ -80,7 +78,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2016-11-01' + self.api_version = '2017-09-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/__init__.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/__init__.py index d28921edb704..57ea5836c71d 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/__init__.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/__init__.py @@ -9,16 +9,21 @@ # regenerated. # -------------------------------------------------------------------------- +from .resource_usage_statistics import ResourceUsageStatistics +from .job_statistics_vertex import JobStatisticsVertex from .job_statistics_vertex_stage import JobStatisticsVertexStage from .job_statistics import JobStatistics from .job_data_path import JobDataPath from .job_state_audit_record import JobStateAuditRecord +from .scope_job_resource import ScopeJobResource from .job_resource import JobResource from .diagnostics import Diagnostics from .usql_job_properties import USqlJobProperties +from .scope_job_properties import ScopeJobProperties from .hive_job_properties import HiveJobProperties from .job_properties import JobProperties from .create_usql_job_properties import CreateUSqlJobProperties +from .create_scope_job_properties import CreateScopeJobProperties from .create_job_properties import CreateJobProperties from .job_inner_error import JobInnerError from .job_error_details import JobErrorDetails @@ -26,11 +31,13 @@ from .job_pipeline_run_information import JobPipelineRunInformation from .job_pipeline_information import JobPipelineInformation from .job_recurrence_information import JobRecurrenceInformation +from .create_scope_job_parameters import CreateScopeJobParameters from .create_job_parameters import CreateJobParameters from .build_job_parameters import BuildJobParameters from .base_job_parameters import BaseJobParameters from .job_information_basic import JobInformationBasic from .job_information import JobInformation +from .update_job_parameters import UpdateJobParameters from .job_pipeline_information_paged import JobPipelineInformationPaged from .job_recurrence_information_paged import JobRecurrenceInformationPaged from .job_information_basic_paged import JobInformationBasicPaged @@ -44,16 +51,21 @@ ) __all__ = [ + 'ResourceUsageStatistics', + 'JobStatisticsVertex', 'JobStatisticsVertexStage', 'JobStatistics', 'JobDataPath', 'JobStateAuditRecord', + 'ScopeJobResource', 'JobResource', 'Diagnostics', 'USqlJobProperties', + 'ScopeJobProperties', 'HiveJobProperties', 'JobProperties', 'CreateUSqlJobProperties', + 'CreateScopeJobProperties', 'CreateJobProperties', 'JobInnerError', 'JobErrorDetails', @@ -61,11 +73,13 @@ 'JobPipelineRunInformation', 'JobPipelineInformation', 'JobRecurrenceInformation', + 'CreateScopeJobParameters', 'CreateJobParameters', 'BuildJobParameters', 'BaseJobParameters', 'JobInformationBasic', 'JobInformation', + 'UpdateJobParameters', 'JobPipelineInformationPaged', 'JobRecurrenceInformationPaged', 'JobInformationBasicPaged', diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/base_job_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/base_job_parameters.py index 8ff42cdafe66..b5d372b3eae9 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/base_job_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/base_job_parameters.py @@ -15,13 +15,12 @@ class BaseJobParameters(Model): """Data Lake Analytics Job Parameters base class for build and submit. - :param type: the job type of the current job (Hive or USql). Possible - values include: 'USql', 'Hive' - :type type: str or :class:`JobType - ` + :param type: the job type of the current job (Hive, USql, or Scope (for + internal use only)). Possible values include: 'USql', 'Hive', 'Scope' + :type type: str or ~azure.mgmt.datalake.analytics.job.models.JobType :param properties: the job specific properties. - :type properties: :class:`CreateJobProperties - ` + :type properties: + ~azure.mgmt.datalake.analytics.job.models.CreateJobProperties """ _validation = { @@ -35,5 +34,6 @@ class BaseJobParameters(Model): } def __init__(self, type, properties): + super(BaseJobParameters, self).__init__() self.type = type self.properties = properties diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/build_job_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/build_job_parameters.py index 3bc9fe52b143..a80cd740a66e 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/build_job_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/build_job_parameters.py @@ -15,13 +15,12 @@ class BuildJobParameters(BaseJobParameters): """The parameters used to build a new Data Lake Analytics job. - :param type: the job type of the current job (Hive or USql). Possible - values include: 'USql', 'Hive' - :type type: str or :class:`JobType - ` + :param type: the job type of the current job (Hive, USql, or Scope (for + internal use only)). Possible values include: 'USql', 'Hive', 'Scope' + :type type: str or ~azure.mgmt.datalake.analytics.job.models.JobType :param properties: the job specific properties. - :type properties: :class:`CreateJobProperties - ` + :type properties: + ~azure.mgmt.datalake.analytics.job.models.CreateJobProperties :param name: the friendly name of the job to build. :type name: str """ diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_parameters.py index d8fb4e346f1c..ac0e564fbc85 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_parameters.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_parameters.py @@ -15,13 +15,12 @@ class CreateJobParameters(BaseJobParameters): """The parameters used to submit a new Data Lake Analytics job. - :param type: the job type of the current job (Hive or USql). Possible - values include: 'USql', 'Hive' - :type type: str or :class:`JobType - ` + :param type: the job type of the current job (Hive, USql, or Scope (for + internal use only)). Possible values include: 'USql', 'Hive', 'Scope' + :type type: str or ~azure.mgmt.datalake.analytics.job.models.JobType :param properties: the job specific properties. - :type properties: :class:`CreateJobProperties - ` + :type properties: + ~azure.mgmt.datalake.analytics.job.models.CreateJobProperties :param name: the friendly name of the job to submit. :type name: str :param degree_of_parallelism: the degree of parallelism to use for this @@ -35,10 +34,10 @@ class CreateJobParameters(BaseJobParameters): :param log_file_patterns: the list of log file name patterns to find in the logFolder. '*' is the only matching character allowed. Example format: jobExecution*.log or *mylog*.txt - :type log_file_patterns: list of str + :type log_file_patterns: list[str] :param related: the recurring job relationship information properties. - :type related: :class:`JobRelationshipProperties - ` + :type related: + ~azure.mgmt.datalake.analytics.job.models.JobRelationshipProperties """ _validation = { diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_properties.py index c4599162449f..1ffce245434d 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_properties.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_job_properties.py @@ -15,12 +15,16 @@ class CreateJobProperties(Model): """The common Data Lake Analytics job properties for job submission. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CreateUSqlJobProperties, CreateScopeJobProperties + :param runtime_version: the runtime version of the Data Lake Analytics engine to use for the specific type of job being run. :type runtime_version: str - :param script: the script to run + :param script: the script to run. Please note that the maximum script size + is 3 MB. :type script: str - :param type: Polymorphic Discriminator + :param type: Constant filled by server. :type type: str """ @@ -36,10 +40,11 @@ class CreateJobProperties(Model): } _subtype_map = { - 'type': {'USql': 'CreateUSqlJobProperties'} + 'type': {'USql': 'CreateUSqlJobProperties', 'Scope': 'CreateScopeJobProperties'} } def __init__(self, script, runtime_version=None): + super(CreateJobProperties, self).__init__() self.runtime_version = runtime_version self.script = script self.type = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_scope_job_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_scope_job_parameters.py new file mode 100644 index 000000000000..07b2f6383c2d --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_scope_job_parameters.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .create_job_parameters import CreateJobParameters + + +class CreateScopeJobParameters(CreateJobParameters): + """The parameters used to submit a new Data Lake Analytics Scope job. (Only + for use internally with Scope job type.). + + :param type: the job type of the current job (Hive, USql, or Scope (for + internal use only)). Possible values include: 'USql', 'Hive', 'Scope' + :type type: str or ~azure.mgmt.datalake.analytics.job.models.JobType + :param properties: the job specific properties. + :type properties: + ~azure.mgmt.datalake.analytics.job.models.CreateJobProperties + :param name: the friendly name of the job to submit. + :type name: str + :param degree_of_parallelism: the degree of parallelism to use for this + job. This must be greater than 0, if set to less than 0 it will default to + 1. Default value: 1 . + :type degree_of_parallelism: int + :param priority: the priority value to use for the current job. Lower + numbers have a higher priority. By default, a job has a priority of 1000. + This must be greater than 0. + :type priority: int + :param log_file_patterns: the list of log file name patterns to find in + the logFolder. '*' is the only matching character allowed. Example format: + jobExecution*.log or *mylog*.txt + :type log_file_patterns: list[str] + :param related: the recurring job relationship information properties. + :type related: + ~azure.mgmt.datalake.analytics.job.models.JobRelationshipProperties + :param tags: the key-value pairs used to add additional metadata to the + job information. (Only for use internally with Scope job type.) + :type tags: dict[str, str] + """ + + _validation = { + 'type': {'required': True}, + 'properties': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobType'}, + 'properties': {'key': 'properties', 'type': 'CreateJobProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + 'degree_of_parallelism': {'key': 'degreeOfParallelism', 'type': 'int'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'log_file_patterns': {'key': 'logFilePatterns', 'type': '[str]'}, + 'related': {'key': 'related', 'type': 'JobRelationshipProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, type, properties, name, degree_of_parallelism=1, priority=None, log_file_patterns=None, related=None, tags=None): + super(CreateScopeJobParameters, self).__init__(type=type, properties=properties, name=name, degree_of_parallelism=degree_of_parallelism, priority=priority, log_file_patterns=log_file_patterns, related=related) + self.tags = tags diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_scope_job_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_scope_job_properties.py new file mode 100644 index 000000000000..09d0267599e1 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_scope_job_properties.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .create_job_properties import CreateJobProperties + + +class CreateScopeJobProperties(CreateJobProperties): + """Scope job properties used when submitting Scope jobs. + + :param runtime_version: the runtime version of the Data Lake Analytics + engine to use for the specific type of job being run. + :type runtime_version: str + :param script: the script to run. Please note that the maximum script size + is 3 MB. + :type script: str + :param type: Constant filled by server. + :type type: str + :param resources: the list of resources that are required by the job. + :type resources: + list[~azure.mgmt.datalake.analytics.job.models.ScopeJobResource] + :param notifier: the list of email addresses, separated by semi-colons, to + notify when the job reaches a terminal state. + :type notifier: str + """ + + _validation = { + 'script': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'script': {'key': 'script', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[ScopeJobResource]'}, + 'notifier': {'key': 'notifier', 'type': 'str'}, + } + + def __init__(self, script, runtime_version=None, resources=None, notifier=None): + super(CreateScopeJobProperties, self).__init__(runtime_version=runtime_version, script=script) + self.resources = resources + self.notifier = notifier + self.type = 'Scope' diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_usql_job_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_usql_job_properties.py index e85a3bcfa205..1640d2a5a6f2 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_usql_job_properties.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/create_usql_job_properties.py @@ -18,16 +18,17 @@ class CreateUSqlJobProperties(CreateJobProperties): :param runtime_version: the runtime version of the Data Lake Analytics engine to use for the specific type of job being run. :type runtime_version: str - :param script: the script to run + :param script: the script to run. Please note that the maximum script size + is 3 MB. :type script: str - :param type: Polymorphic Discriminator + :param type: Constant filled by server. :type type: str - :param compile_mode: Optionally enforces a specific compilation mode for - the job during execution. If this is not specified during submission, the - server will determine the optimal compilation mode. Possible values - include: 'Semantic', 'Full', 'SingleBox' - :type compile_mode: str or :class:`CompileMode - ` + :param compile_mode: the specific compilation mode for the job used during + execution. If this is not specified during submission, the server will + determine the optimal compilation mode. Possible values include: + 'Semantic', 'Full', 'SingleBox' + :type compile_mode: str or + ~azure.mgmt.datalake.analytics.job.models.CompileMode """ _validation = { diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py index fdec7b65d264..b90127007fc3 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py @@ -43,6 +43,7 @@ class JobType(Enum): usql = "USql" hive = "Hive" + scope = "Scope" class JobState(Enum): diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/diagnostics.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/diagnostics.py index 7def54e08cde..fdf5b3758f39 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/diagnostics.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/diagnostics.py @@ -28,8 +28,8 @@ class Diagnostics(Model): :vartype message: str :ivar severity: the severity of the error. Possible values include: 'Warning', 'Error', 'Info', 'SevereWarning', 'Deprecated', 'UserWarning' - :vartype severity: str or :class:`SeverityTypes - ` + :vartype severity: str or + ~azure.mgmt.datalake.analytics.job.models.SeverityTypes :ivar start: the starting index of the error. :vartype start: int """ @@ -53,6 +53,7 @@ class Diagnostics(Model): } def __init__(self): + super(Diagnostics, self).__init__() self.column_number = None self.end = None self.line_number = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/hive_job_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/hive_job_properties.py index 74df4f70dd04..217ba284a0b8 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/hive_job_properties.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/hive_job_properties.py @@ -21,9 +21,10 @@ class HiveJobProperties(JobProperties): :param runtime_version: the runtime version of the Data Lake Analytics engine to use for the specific type of job being run. :type runtime_version: str - :param script: the script to run + :param script: the script to run. Please note that the maximum script size + is 3 MB. :type script: str - :param type: Polymorphic Discriminator + :param type: Constant filled by server. :type type: str :ivar logs_location: the Hive logs location :vartype logs_location: str diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_data_path.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_data_path.py index 394b125f35ba..edda346e5905 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_data_path.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_data_path.py @@ -23,7 +23,7 @@ class JobDataPath(Model): :ivar command: the command that this job data relates to. :vartype command: str :ivar paths: the list of paths to all of the job data. - :vartype paths: list of str + :vartype paths: list[str] """ _validation = { @@ -39,6 +39,7 @@ class JobDataPath(Model): } def __init__(self): + super(JobDataPath, self).__init__() self.job_id = None self.command = None self.paths = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_error_details.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_error_details.py index 9b160bd9753d..9085a596e9ec 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_error_details.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_error_details.py @@ -45,13 +45,13 @@ class JobErrorDetails(Model): :vartype resolution: str :ivar inner_error: the inner error of this specific job error message, if any. - :vartype inner_error: :class:`JobInnerError - ` + :vartype inner_error: + ~azure.mgmt.datalake.analytics.job.models.JobInnerError :ivar severity: the severity level of the failure. Possible values include: 'Warning', 'Error', 'Info', 'SevereWarning', 'Deprecated', 'UserWarning' - :vartype severity: str or :class:`SeverityTypes - ` + :vartype severity: str or + ~azure.mgmt.datalake.analytics.job.models.SeverityTypes :ivar source: the ultimate source of the failure (usually either SYSTEM or USER). :vartype source: str @@ -94,6 +94,7 @@ class JobErrorDetails(Model): } def __init__(self): + super(JobErrorDetails, self).__init__() self.description = None self.details = None self.end_offset = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py index b4c54c483e39..8235029bffcd 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py @@ -23,10 +23,9 @@ class JobInformation(JobInformationBasic): :vartype job_id: str :param name: the friendly name of the job. :type name: str - :param type: the job type of the current job (Hive or USql). Possible - values include: 'USql', 'Hive' - :type type: str or :class:`JobType - ` + :param type: the job type of the current job (Hive, USql, or Scope (for + internal use only)). Possible values include: 'USql', 'Hive', 'Scope' + :type type: str or ~azure.mgmt.datalake.analytics.job.models.JobType :ivar submitter: the user or account that submitted the job. :vartype submitter: str :param degree_of_parallelism: the degree of parallelism used for this job. @@ -47,34 +46,35 @@ class JobInformation(JobInformationBasic): Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', 'Starting', 'Paused', 'WaitingForCapacity' - :vartype state: str or :class:`JobState - ` + :vartype state: str or ~azure.mgmt.datalake.analytics.job.models.JobState :ivar result: the result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', 'Failed' - :vartype result: str or :class:`JobResult - ` + :vartype result: str or + ~azure.mgmt.datalake.analytics.job.models.JobResult :ivar log_folder: the log folder path to use in the following format: adl://.azuredatalakestore.net/system/jobservice/jobs/Usql/2016/03/13/17/18/5fe51957-93bc-4de0-8ddc-c5a4753b068b/logs/. :vartype log_folder: str :param log_file_patterns: the list of log file name patterns to find in the logFolder. '*' is the only matching character allowed. Example format: jobExecution*.log or *mylog*.txt - :type log_file_patterns: list of str + :type log_file_patterns: list[str] :param related: the recurring job relationship information properties. - :type related: :class:`JobRelationshipProperties - ` + :type related: + ~azure.mgmt.datalake.analytics.job.models.JobRelationshipProperties + :param tags: the key-value pairs used to add additional metadata to the + job information. (Only for use internally with Scope job type.) + :type tags: dict[str, str] :ivar error_message: the error message details for the job, if the job failed. - :vartype error_message: list of :class:`JobErrorDetails - ` + :vartype error_message: + list[~azure.mgmt.datalake.analytics.job.models.JobErrorDetails] :ivar state_audit_records: the job state audit records, indicating when various operations have been performed on this job. - :vartype state_audit_records: list of :class:`JobStateAuditRecord - ` + :vartype state_audit_records: + list[~azure.mgmt.datalake.analytics.job.models.JobStateAuditRecord] :param properties: the job specific properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.datalake.analytics.job.models.JobProperties """ _validation = { @@ -108,13 +108,14 @@ class JobInformation(JobInformationBasic): 'log_folder': {'key': 'logFolder', 'type': 'str'}, 'log_file_patterns': {'key': 'logFilePatterns', 'type': '[str]'}, 'related': {'key': 'related', 'type': 'JobRelationshipProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'error_message': {'key': 'errorMessage', 'type': '[JobErrorDetails]'}, 'state_audit_records': {'key': 'stateAuditRecords', 'type': '[JobStateAuditRecord]'}, 'properties': {'key': 'properties', 'type': 'JobProperties'}, } - def __init__(self, name, type, properties, degree_of_parallelism=1, priority=None, log_file_patterns=None, related=None): - super(JobInformation, self).__init__(name=name, type=type, degree_of_parallelism=degree_of_parallelism, priority=priority, log_file_patterns=log_file_patterns, related=related) + def __init__(self, name, type, properties, degree_of_parallelism=1, priority=None, log_file_patterns=None, related=None, tags=None): + super(JobInformation, self).__init__(name=name, type=type, degree_of_parallelism=degree_of_parallelism, priority=priority, log_file_patterns=log_file_patterns, related=related, tags=tags) self.error_message = None self.state_audit_records = None self.properties = properties diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py index b20b9b653236..9cb67c342c4c 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py @@ -22,10 +22,9 @@ class JobInformationBasic(Model): :vartype job_id: str :param name: the friendly name of the job. :type name: str - :param type: the job type of the current job (Hive or USql). Possible - values include: 'USql', 'Hive' - :type type: str or :class:`JobType - ` + :param type: the job type of the current job (Hive, USql, or Scope (for + internal use only)). Possible values include: 'USql', 'Hive', 'Scope' + :type type: str or ~azure.mgmt.datalake.analytics.job.models.JobType :ivar submitter: the user or account that submitted the job. :vartype submitter: str :param degree_of_parallelism: the degree of parallelism used for this job. @@ -46,23 +45,25 @@ class JobInformationBasic(Model): Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', 'Starting', 'Paused', 'WaitingForCapacity' - :vartype state: str or :class:`JobState - ` + :vartype state: str or ~azure.mgmt.datalake.analytics.job.models.JobState :ivar result: the result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', 'Failed' - :vartype result: str or :class:`JobResult - ` + :vartype result: str or + ~azure.mgmt.datalake.analytics.job.models.JobResult :ivar log_folder: the log folder path to use in the following format: adl://.azuredatalakestore.net/system/jobservice/jobs/Usql/2016/03/13/17/18/5fe51957-93bc-4de0-8ddc-c5a4753b068b/logs/. :vartype log_folder: str :param log_file_patterns: the list of log file name patterns to find in the logFolder. '*' is the only matching character allowed. Example format: jobExecution*.log or *mylog*.txt - :type log_file_patterns: list of str + :type log_file_patterns: list[str] :param related: the recurring job relationship information properties. - :type related: :class:`JobRelationshipProperties - ` + :type related: + ~azure.mgmt.datalake.analytics.job.models.JobRelationshipProperties + :param tags: the key-value pairs used to add additional metadata to the + job information. (Only for use internally with Scope job type.) + :type tags: dict[str, str] """ _validation = { @@ -93,9 +94,11 @@ class JobInformationBasic(Model): 'log_folder': {'key': 'logFolder', 'type': 'str'}, 'log_file_patterns': {'key': 'logFilePatterns', 'type': '[str]'}, 'related': {'key': 'related', 'type': 'JobRelationshipProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, name, type, degree_of_parallelism=1, priority=None, log_file_patterns=None, related=None): + def __init__(self, name, type, degree_of_parallelism=1, priority=None, log_file_patterns=None, related=None, tags=None): + super(JobInformationBasic, self).__init__() self.job_id = None self.name = name self.type = type @@ -110,3 +113,4 @@ def __init__(self, name, type, degree_of_parallelism=1, priority=None, log_file_ self.log_folder = None self.log_file_patterns = log_file_patterns self.related = related + self.tags = tags diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_inner_error.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_inner_error.py index 00b1e4eaf1cf..fac1479a1491 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_inner_error.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_inner_error.py @@ -23,8 +23,8 @@ class JobInnerError(Model): :ivar severity: the severity level of the failure. Possible values include: 'Warning', 'Error', 'Info', 'SevereWarning', 'Deprecated', 'UserWarning' - :vartype severity: str or :class:`SeverityTypes - ` + :vartype severity: str or + ~azure.mgmt.datalake.analytics.job.models.SeverityTypes :ivar details: the details of the error message. :vartype details: str :ivar component: the component that failed. @@ -48,6 +48,10 @@ class JobInnerError(Model): :vartype source: str :ivar description: the error message description :vartype description: str + :ivar inner_error: the inner error of this specific job error message, if + any. + :vartype inner_error: + ~azure.mgmt.datalake.analytics.job.models.JobInnerError """ _validation = { @@ -62,6 +66,7 @@ class JobInnerError(Model): 'resolution': {'readonly': True}, 'source': {'readonly': True}, 'description': {'readonly': True}, + 'inner_error': {'readonly': True}, } _attribute_map = { @@ -76,9 +81,11 @@ class JobInnerError(Model): 'resolution': {'key': 'resolution', 'type': 'str'}, 'source': {'key': 'source', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, + 'inner_error': {'key': 'innerError', 'type': 'JobInnerError'}, } def __init__(self): + super(JobInnerError, self).__init__() self.diagnostic_code = None self.severity = None self.details = None @@ -90,3 +97,4 @@ def __init__(self): self.resolution = None self.source = None self.description = None + self.inner_error = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_information.py index 99a475912ae5..274f344fa495 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_information.py @@ -50,11 +50,11 @@ class JobPipelineInformation(Model): :vartype last_submit_time: datetime :ivar runs: the list of recurrence identifiers representing each run of this pipeline. - :vartype runs: list of :class:`JobPipelineRunInformation - ` + :vartype runs: + list[~azure.mgmt.datalake.analytics.job.models.JobPipelineRunInformation] :ivar recurrences: the list of recurrence identifiers representing each run of this pipeline. - :vartype recurrences: list of str + :vartype recurrences: list[str] """ _validation = { @@ -88,6 +88,7 @@ class JobPipelineInformation(Model): } def __init__(self): + super(JobPipelineInformation, self).__init__() self.pipeline_id = None self.pipeline_name = None self.pipeline_uri = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_run_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_run_information.py index ff829170c6e0..0dd46d6d4d25 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_run_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_pipeline_run_information.py @@ -36,5 +36,6 @@ class JobPipelineRunInformation(Model): } def __init__(self): + super(JobPipelineRunInformation, self).__init__() self.run_id = None self.last_submit_time = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_properties.py index 54ecbbff64a7..281bb014f038 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_properties.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_properties.py @@ -15,12 +15,16 @@ class JobProperties(Model): """The common Data Lake Analytics job properties. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: USqlJobProperties, ScopeJobProperties, HiveJobProperties + :param runtime_version: the runtime version of the Data Lake Analytics engine to use for the specific type of job being run. :type runtime_version: str - :param script: the script to run + :param script: the script to run. Please note that the maximum script size + is 3 MB. :type script: str - :param type: Polymorphic Discriminator + :param type: Constant filled by server. :type type: str """ @@ -36,10 +40,11 @@ class JobProperties(Model): } _subtype_map = { - 'type': {'USql': 'USqlJobProperties', 'Hive': 'HiveJobProperties'} + 'type': {'USql': 'USqlJobProperties', 'Scope': 'ScopeJobProperties', 'Hive': 'HiveJobProperties'} } def __init__(self, script, runtime_version=None): + super(JobProperties, self).__init__() self.runtime_version = runtime_version self.script = script self.type = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_recurrence_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_recurrence_information.py index b37a2c98a002..d32882e99322 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_recurrence_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_recurrence_information.py @@ -73,6 +73,7 @@ class JobRecurrenceInformation(Model): } def __init__(self): + super(JobRecurrenceInformation, self).__init__() self.recurrence_id = None self.recurrence_name = None self.num_jobs_failed = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_relationship_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_relationship_properties.py index df704d923be2..99e66b2c6854 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_relationship_properties.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_relationship_properties.py @@ -52,6 +52,7 @@ class JobRelationshipProperties(Model): } def __init__(self, recurrence_id, pipeline_id=None, pipeline_name=None, pipeline_uri=None, run_id=None, recurrence_name=None): + super(JobRelationshipProperties, self).__init__() self.pipeline_id = pipeline_id self.pipeline_name = pipeline_name self.pipeline_uri = pipeline_uri diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_resource.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_resource.py index fd433c5aa75a..f3ad28a6f409 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_resource.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_resource.py @@ -23,8 +23,8 @@ class JobResource(Model): 'VertexResource', 'JobManagerResource', 'StatisticsResource', 'VertexResourceInUserFolder', 'JobManagerResourceInUserFolder', 'StatisticsResourceInUserFolder' - :type type: str or :class:`JobResourceType - ` + :type type: str or + ~azure.mgmt.datalake.analytics.job.models.JobResourceType """ _attribute_map = { @@ -34,6 +34,7 @@ class JobResource(Model): } def __init__(self, name=None, resource_path=None, type=None): + super(JobResource, self).__init__() self.name = name self.resource_path = resource_path self.type = type diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_state_audit_record.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_state_audit_record.py index 50c488141fe7..5cf5717f649f 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_state_audit_record.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_state_audit_record.py @@ -44,6 +44,7 @@ class JobStateAuditRecord(Model): } def __init__(self): + super(JobStateAuditRecord, self).__init__() self.new_state = None self.time_stamp = None self.requested_by_user = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics.py index ff8bd6e0317e..ef6c9fc7f9bc 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics.py @@ -23,8 +23,8 @@ class JobStatistics(Model): :ivar finalizing_time_utc: the job finalizing start time. :vartype finalizing_time_utc: datetime :ivar stages: the list of stages for the job. - :vartype stages: list of :class:`JobStatisticsVertexStage - ` + :vartype stages: + list[~azure.mgmt.datalake.analytics.job.models.JobStatisticsVertexStage] """ _validation = { @@ -40,6 +40,7 @@ class JobStatistics(Model): } def __init__(self): + super(JobStatistics, self).__init__() self.last_update_time_utc = None self.finalizing_time_utc = None self.stages = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics_vertex.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics_vertex.py new file mode 100644 index 000000000000..8688d0bcb6a6 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics_vertex.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStatisticsVertex(Model): + """the detailed information for a vertex. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of the vertex. + :vartype name: str + :ivar vertex_id: the id of the vertex. + :vartype vertex_id: str + :ivar execution_time: the amount of execution time of the vertex. + :vartype execution_time: timedelta + :ivar data_read: the amount of data read of the vertex, in bytes. + :vartype data_read: long + :ivar peak_mem_usage: the amount of peak memory usage of the vertex, in + bytes. + :vartype peak_mem_usage: long + """ + + _validation = { + 'name': {'readonly': True}, + 'vertex_id': {'readonly': True}, + 'execution_time': {'readonly': True}, + 'data_read': {'readonly': True}, + 'peak_mem_usage': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'vertex_id': {'key': 'vertexId', 'type': 'str'}, + 'execution_time': {'key': 'executionTime', 'type': 'duration'}, + 'data_read': {'key': 'dataRead', 'type': 'long'}, + 'peak_mem_usage': {'key': 'peakMemUsage', 'type': 'long'}, + } + + def __init__(self): + super(JobStatisticsVertex, self).__init__() + self.name = None + self.vertex_id = None + self.execution_time = None + self.data_read = None + self.peak_mem_usage = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics_vertex_stage.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics_vertex_stage.py index 1cb065a4dcff..edf6908ab3e2 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics_vertex_stage.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_statistics_vertex_stage.py @@ -68,6 +68,49 @@ class JobStatisticsVertexStage(Model): :ivar total_succeeded_time: the amount of time all successful vertices took in this stage. :vartype total_succeeded_time: timedelta + :ivar total_peak_mem_usage: the sum of the peak memory usage of all the + vertices in the stage, in bytes. + :vartype total_peak_mem_usage: long + :ivar total_execution_time: the sum of the total execution time of all the + vertices in the stage. + :vartype total_execution_time: timedelta + :param max_data_read_vertex: the vertex with the maximum amount of data + read. + :type max_data_read_vertex: + ~azure.mgmt.datalake.analytics.job.models.JobStatisticsVertex + :param max_execution_time_vertex: the vertex with the maximum execution + time. + :type max_execution_time_vertex: + ~azure.mgmt.datalake.analytics.job.models.JobStatisticsVertex + :param max_peak_mem_usage_vertex: the vertex with the maximum peak memory + usage. + :type max_peak_mem_usage_vertex: + ~azure.mgmt.datalake.analytics.job.models.JobStatisticsVertex + :ivar estimated_vertex_cpu_core_count: the estimated vertex CPU core + count. + :vartype estimated_vertex_cpu_core_count: int + :ivar estimated_vertex_peak_cpu_core_count: the estimated vertex peak CPU + core count. + :vartype estimated_vertex_peak_cpu_core_count: int + :ivar estimated_vertex_mem_size: the estimated vertex memory size, in + bytes. + :vartype estimated_vertex_mem_size: long + :param allocated_container_cpu_core_count: the statistics information for + the allocated container CPU core count. + :type allocated_container_cpu_core_count: + ~azure.mgmt.datalake.analytics.job.models.ResourceUsageStatistics + :param allocated_container_mem_size: the statistics information for the + allocated container memory size. + :type allocated_container_mem_size: + ~azure.mgmt.datalake.analytics.job.models.ResourceUsageStatistics + :param used_vertex_cpu_core_count: the statistics information for the used + vertex CPU core count. + :type used_vertex_cpu_core_count: + ~azure.mgmt.datalake.analytics.job.models.ResourceUsageStatistics + :param used_vertex_peak_mem_size: the statistics information for the used + vertex peak memory size. + :type used_vertex_peak_mem_size: + ~azure.mgmt.datalake.analytics.job.models.ResourceUsageStatistics """ _validation = { @@ -91,6 +134,11 @@ class JobStatisticsVertexStage(Model): 'total_failed_time': {'readonly': True}, 'total_progress': {'readonly': True}, 'total_succeeded_time': {'readonly': True}, + 'total_peak_mem_usage': {'readonly': True}, + 'total_execution_time': {'readonly': True}, + 'estimated_vertex_cpu_core_count': {'readonly': True}, + 'estimated_vertex_peak_cpu_core_count': {'readonly': True}, + 'estimated_vertex_mem_size': {'readonly': True}, } _attribute_map = { @@ -114,9 +162,22 @@ class JobStatisticsVertexStage(Model): 'total_failed_time': {'key': 'totalFailedTime', 'type': 'duration'}, 'total_progress': {'key': 'totalProgress', 'type': 'int'}, 'total_succeeded_time': {'key': 'totalSucceededTime', 'type': 'duration'}, + 'total_peak_mem_usage': {'key': 'totalPeakMemUsage', 'type': 'long'}, + 'total_execution_time': {'key': 'totalExecutionTime', 'type': 'duration'}, + 'max_data_read_vertex': {'key': 'maxDataReadVertex', 'type': 'JobStatisticsVertex'}, + 'max_execution_time_vertex': {'key': 'maxExecutionTimeVertex', 'type': 'JobStatisticsVertex'}, + 'max_peak_mem_usage_vertex': {'key': 'maxPeakMemUsageVertex', 'type': 'JobStatisticsVertex'}, + 'estimated_vertex_cpu_core_count': {'key': 'estimatedVertexCpuCoreCount', 'type': 'int'}, + 'estimated_vertex_peak_cpu_core_count': {'key': 'estimatedVertexPeakCpuCoreCount', 'type': 'int'}, + 'estimated_vertex_mem_size': {'key': 'estimatedVertexMemSize', 'type': 'long'}, + 'allocated_container_cpu_core_count': {'key': 'allocatedContainerCpuCoreCount', 'type': 'ResourceUsageStatistics'}, + 'allocated_container_mem_size': {'key': 'allocatedContainerMemSize', 'type': 'ResourceUsageStatistics'}, + 'used_vertex_cpu_core_count': {'key': 'usedVertexCpuCoreCount', 'type': 'ResourceUsageStatistics'}, + 'used_vertex_peak_mem_size': {'key': 'usedVertexPeakMemSize', 'type': 'ResourceUsageStatistics'}, } - def __init__(self): + def __init__(self, max_data_read_vertex=None, max_execution_time_vertex=None, max_peak_mem_usage_vertex=None, allocated_container_cpu_core_count=None, allocated_container_mem_size=None, used_vertex_cpu_core_count=None, used_vertex_peak_mem_size=None): + super(JobStatisticsVertexStage, self).__init__() self.data_read = None self.data_read_cross_pod = None self.data_read_intra_pod = None @@ -137,3 +198,15 @@ def __init__(self): self.total_failed_time = None self.total_progress = None self.total_succeeded_time = None + self.total_peak_mem_usage = None + self.total_execution_time = None + self.max_data_read_vertex = max_data_read_vertex + self.max_execution_time_vertex = max_execution_time_vertex + self.max_peak_mem_usage_vertex = max_peak_mem_usage_vertex + self.estimated_vertex_cpu_core_count = None + self.estimated_vertex_peak_cpu_core_count = None + self.estimated_vertex_mem_size = None + self.allocated_container_cpu_core_count = allocated_container_cpu_core_count + self.allocated_container_mem_size = allocated_container_mem_size + self.used_vertex_cpu_core_count = used_vertex_cpu_core_count + self.used_vertex_peak_mem_size = used_vertex_peak_mem_size diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/resource_usage_statistics.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/resource_usage_statistics.py new file mode 100644 index 000000000000..e8fb529d5c72 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/resource_usage_statistics.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceUsageStatistics(Model): + """the statistics information for resource usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar average: the average value. + :vartype average: float + :ivar minimum: the minimum value. + :vartype minimum: long + :ivar maximum: the maximum value. + :vartype maximum: long + """ + + _validation = { + 'average': {'readonly': True}, + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + } + + _attribute_map = { + 'average': {'key': 'average', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + } + + def __init__(self): + super(ResourceUsageStatistics, self).__init__() + self.average = None + self.minimum = None + self.maximum = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/scope_job_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/scope_job_properties.py new file mode 100644 index 000000000000..64e2ed11991e --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/scope_job_properties.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .job_properties import JobProperties + + +class ScopeJobProperties(JobProperties): + """Scope job properties used when submitting and retrieving Scope jobs. (Only + for use internally with Scope job type.). + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param runtime_version: the runtime version of the Data Lake Analytics + engine to use for the specific type of job being run. + :type runtime_version: str + :param script: the script to run. Please note that the maximum script size + is 3 MB. + :type script: str + :param type: Constant filled by server. + :type type: str + :ivar resources: the list of resources that are required by the job + :vartype resources: + list[~azure.mgmt.datalake.analytics.job.models.ScopeJobResource] + :ivar user_algebra_path: the algebra file path after the job has completed + :vartype user_algebra_path: str + :param notifier: the list of email addresses, separated by semi-colons, to + notify when the job reaches a terminal state. + :type notifier: str + :ivar total_compilation_time: the total time this job spent compiling. + This value should not be set by the user and will be ignored if it is. + :vartype total_compilation_time: timedelta + :ivar total_paused_time: the total time this job spent paused. This value + should not be set by the user and will be ignored if it is. + :vartype total_paused_time: timedelta + :ivar total_queued_time: the total time this job spent queued. This value + should not be set by the user and will be ignored if it is. + :vartype total_queued_time: timedelta + :ivar total_running_time: the total time this job spent executing. This + value should not be set by the user and will be ignored if it is. + :vartype total_running_time: timedelta + :ivar root_process_node_id: the ID used to identify the job manager + coordinating job execution. This value should not be set by the user and + will be ignored if it is. + :vartype root_process_node_id: str + :ivar yarn_application_id: the ID used to identify the yarn application + executing the job. This value should not be set by the user and will be + ignored if it is. + :vartype yarn_application_id: str + """ + + _validation = { + 'script': {'required': True}, + 'type': {'required': True}, + 'resources': {'readonly': True}, + 'user_algebra_path': {'readonly': True}, + 'total_compilation_time': {'readonly': True}, + 'total_paused_time': {'readonly': True}, + 'total_queued_time': {'readonly': True}, + 'total_running_time': {'readonly': True}, + 'root_process_node_id': {'readonly': True}, + 'yarn_application_id': {'readonly': True}, + } + + _attribute_map = { + 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + 'script': {'key': 'script', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[ScopeJobResource]'}, + 'user_algebra_path': {'key': 'userAlgebraPath', 'type': 'str'}, + 'notifier': {'key': 'notifier', 'type': 'str'}, + 'total_compilation_time': {'key': 'totalCompilationTime', 'type': 'duration'}, + 'total_paused_time': {'key': 'totalPausedTime', 'type': 'duration'}, + 'total_queued_time': {'key': 'totalQueuedTime', 'type': 'duration'}, + 'total_running_time': {'key': 'totalRunningTime', 'type': 'duration'}, + 'root_process_node_id': {'key': 'rootProcessNodeId', 'type': 'str'}, + 'yarn_application_id': {'key': 'yarnApplicationId', 'type': 'str'}, + } + + def __init__(self, script, runtime_version=None, notifier=None): + super(ScopeJobProperties, self).__init__(runtime_version=runtime_version, script=script) + self.resources = None + self.user_algebra_path = None + self.notifier = notifier + self.total_compilation_time = None + self.total_paused_time = None + self.total_queued_time = None + self.total_running_time = None + self.root_process_node_id = None + self.yarn_application_id = None + self.type = 'Scope' diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/scope_job_resource.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/scope_job_resource.py new file mode 100644 index 000000000000..10e30d0c6a76 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/scope_job_resource.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScopeJobResource(Model): + """The Scope job resources. (Only for use internally with Scope job type.). + + :param name: the name of the resource. + :type name: str + :param path: the path to the resource. + :type path: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, name=None, path=None): + super(ScopeJobResource, self).__init__() + self.name = name + self.path = path diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/update_job_parameters.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/update_job_parameters.py new file mode 100644 index 000000000000..04e8a4ae3348 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/update_job_parameters.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateJobParameters(Model): + """The parameters that can be used to update existing Data Lake Analytics job + information properties. (Only for use internally with Scope job type.). + + :param degree_of_parallelism: the degree of parallelism used for this job. + This must be greater than 0, if set to less than 0 it will default to 1. + :type degree_of_parallelism: int + :param priority: the priority value for the current job. Lower numbers + have a higher priority. By default, a job has a priority of 1000. This + must be greater than 0. + :type priority: int + :param tags: the key-value pairs used to add additional metadata to the + job information. (Only for use internally with Scope job type.) + :type tags: dict[str, str] + """ + + _attribute_map = { + 'degree_of_parallelism': {'key': 'degreeOfParallelism', 'type': 'int'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, degree_of_parallelism=None, priority=None, tags=None): + super(UpdateJobParameters, self).__init__() + self.degree_of_parallelism = degree_of_parallelism + self.priority = priority + self.tags = tags diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/usql_job_properties.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/usql_job_properties.py index 0fc94bebc078..6f595b7130b2 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/usql_job_properties.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/usql_job_properties.py @@ -21,30 +21,29 @@ class USqlJobProperties(JobProperties): :param runtime_version: the runtime version of the Data Lake Analytics engine to use for the specific type of job being run. :type runtime_version: str - :param script: the script to run + :param script: the script to run. Please note that the maximum script size + is 3 MB. :type script: str - :param type: Polymorphic Discriminator + :param type: Constant filled by server. :type type: str :ivar resources: the list of resources that are required by the job - :vartype resources: list of :class:`JobResource - ` - :ivar statistics: the job specific statistics. - :vartype statistics: :class:`JobStatistics - ` - :ivar debug_data: the job specific debug data locations. - :vartype debug_data: :class:`JobDataPath - ` + :vartype resources: + list[~azure.mgmt.datalake.analytics.job.models.JobResource] + :param statistics: the job specific statistics. + :type statistics: ~azure.mgmt.datalake.analytics.job.models.JobStatistics + :param debug_data: the job specific debug data locations. + :type debug_data: ~azure.mgmt.datalake.analytics.job.models.JobDataPath :ivar diagnostics: the diagnostics for the job. - :vartype diagnostics: list of :class:`Diagnostics - ` + :vartype diagnostics: + list[~azure.mgmt.datalake.analytics.job.models.Diagnostics] :ivar algebra_file_path: the algebra file path after the job has completed :vartype algebra_file_path: str :ivar total_compilation_time: the total time this job spent compiling. This value should not be set by the user and will be ignored if it is. :vartype total_compilation_time: timedelta - :ivar total_pause_time: the total time this job spent paused. This value + :ivar total_paused_time: the total time this job spent paused. This value should not be set by the user and will be ignored if it is. - :vartype total_pause_time: timedelta + :vartype total_paused_time: timedelta :ivar total_queued_time: the total time this job spent queued. This value should not be set by the user and will be ignored if it is. :vartype total_queued_time: timedelta @@ -67,20 +66,18 @@ class USqlJobProperties(JobProperties): execution. If this is not specified during submission, the server will determine the optimal compilation mode. Possible values include: 'Semantic', 'Full', 'SingleBox' - :vartype compile_mode: str or :class:`CompileMode - ` + :vartype compile_mode: str or + ~azure.mgmt.datalake.analytics.job.models.CompileMode """ _validation = { 'script': {'required': True}, 'type': {'required': True}, 'resources': {'readonly': True}, - 'statistics': {'readonly': True}, - 'debug_data': {'readonly': True}, 'diagnostics': {'readonly': True}, 'algebra_file_path': {'readonly': True}, 'total_compilation_time': {'readonly': True}, - 'total_pause_time': {'readonly': True}, + 'total_paused_time': {'readonly': True}, 'total_queued_time': {'readonly': True}, 'total_running_time': {'readonly': True}, 'root_process_node_id': {'readonly': True}, @@ -99,7 +96,7 @@ class USqlJobProperties(JobProperties): 'diagnostics': {'key': 'diagnostics', 'type': '[Diagnostics]'}, 'algebra_file_path': {'key': 'algebraFilePath', 'type': 'str'}, 'total_compilation_time': {'key': 'totalCompilationTime', 'type': 'duration'}, - 'total_pause_time': {'key': 'totalPauseTime', 'type': 'duration'}, + 'total_paused_time': {'key': 'totalPausedTime', 'type': 'duration'}, 'total_queued_time': {'key': 'totalQueuedTime', 'type': 'duration'}, 'total_running_time': {'key': 'totalRunningTime', 'type': 'duration'}, 'root_process_node_id': {'key': 'rootProcessNodeId', 'type': 'str'}, @@ -108,15 +105,15 @@ class USqlJobProperties(JobProperties): 'compile_mode': {'key': 'compileMode', 'type': 'CompileMode'}, } - def __init__(self, script, runtime_version=None): + def __init__(self, script, runtime_version=None, statistics=None, debug_data=None): super(USqlJobProperties, self).__init__(runtime_version=runtime_version, script=script) self.resources = None - self.statistics = None - self.debug_data = None + self.statistics = statistics + self.debug_data = debug_data self.diagnostics = None self.algebra_file_path = None self.total_compilation_time = None - self.total_pause_time = None + self.total_paused_time = None self.total_queued_time = None self.total_running_time = None self.root_process_node_id = None diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/job_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/job_operations.py index 784575a75aaf..9b086ad500c4 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/job_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/job_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -23,15 +25,17 @@ class JobOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-11-01". + :ivar api_version: Client Api Version. Constant value: "2017-09-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-11-01" + self.api_version = "2017-09-01-preview" self.config = config @@ -49,13 +53,9 @@ def get_statistics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`JobStatistics - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobStatistics - ` or - :class:`ClientRawResponse` + :return: JobStatistics or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.job.models.JobStatistics or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -83,7 +83,7 @@ def get_statistics( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -108,20 +108,17 @@ def get_debug_data_path( :param account_name: The Azure Data Lake Analytics account to execute job operations on. :type account_name: str - :param job_identity: JobInfo ID. + :param job_identity: Job identifier. Uniquely identifies the job + across all jobs submitted to the service. :type job_identity: 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: :class:`JobDataPath - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobDataPath - ` or - :class:`ClientRawResponse` + :return: JobDataPath or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.job.models.JobDataPath or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -149,7 +146,7 @@ def get_debug_data_path( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,20 +173,16 @@ def build( job operations on. :type account_name: str :param parameters: The parameters to build a job. - :type parameters: :class:`BuildJobParameters - ` + :type parameters: + ~azure.mgmt.datalake.analytics.job.models.BuildJobParameters :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: :class:`JobInformation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobInformation - ` or - :class:`ClientRawResponse` + :return: JobInformation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.job.models.JobInformation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -220,7 +213,7 @@ def build( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -238,6 +231,45 @@ def build( return deserialized + + def _cancel_initial( + self, account_name, job_identity, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/Jobs/{jobIdentity}/CancelJob' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaJobDnsSuffix': self._serialize.url("self.config.adla_job_dns_suffix", self.config.adla_job_dns_suffix, 'str', skip_quote=True), + 'jobIdentity': self._serialize.url("job_identity", job_identity, '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['Content-Type'] = 'application/json; charset=utf-8' + 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.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + def cancel( self, account_name, job_identity, custom_headers=None, raw=False, **operation_config): """Cancels the running job specified by the job ID. @@ -245,22 +277,65 @@ def cancel( :param account_name: The Azure Data Lake Analytics account to execute job operations on. :type account_name: str - :param job_identity: JobInfo ID to cancel. + :param job_identity: Job identifier. Uniquely identifies the job + across all jobs submitted to the service. :type job_identity: 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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + raw_result = self._cancel_initial( + account_name=account_name, + job_identity=job_identity, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + + def _yield_method_initial( + self, account_name, job_identity, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/Jobs/{jobIdentity}/CancelJob' + url = '/Jobs/{jobIdentity}/YieldJob' path_format_arguments = { 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), 'adlaJobDnsSuffix': self._serialize.url("self.config.adla_job_dns_suffix", self.config.adla_job_dns_suffix, 'str', skip_quote=True), @@ -284,9 +359,9 @@ def cancel( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -295,6 +370,69 @@ def cancel( client_raw_response = ClientRawResponse(None, response) return client_raw_response + def yield_method( + self, account_name, job_identity, custom_headers=None, raw=False, **operation_config): + """Pauses the specified job and places it back in the job queue, behind + other jobs of equal or higher importance, based on priority. (Only for + use internally with Scope job type.). + + :param account_name: The Azure Data Lake Analytics account to execute + job operations on. + :type account_name: str + :param job_identity: Job identifier. Uniquely identifies the job + across all jobs submitted to the service. + :type job_identity: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._yield_method_initial( + account_name=account_name, + job_identity=job_identity, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + def create( self, account_name, job_identity, parameters, custom_headers=None, raw=False, **operation_config): """Submits a job to the specified Data Lake Analytics account. @@ -302,23 +440,20 @@ def create( :param account_name: The Azure Data Lake Analytics account to execute job operations on. :type account_name: str - :param job_identity: The job ID (a GUID) for the job being submitted. + :param job_identity: Job identifier. Uniquely identifies the job + across all jobs submitted to the service. :type job_identity: str :param parameters: The parameters to submit a job. - :type parameters: :class:`CreateJobParameters - ` + :type parameters: + ~azure.mgmt.datalake.analytics.job.models.CreateJobParameters :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: :class:`JobInformation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobInformation - ` or - :class:`ClientRawResponse` + :return: JobInformation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.job.models.JobInformation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -350,7 +485,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -382,13 +517,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`JobInformation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobInformation - ` or - :class:`ClientRawResponse` + :return: JobInformation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datalake.analytics.job.models.JobInformation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -416,7 +547,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -434,6 +565,130 @@ def get( return deserialized + + def _update_initial( + self, account_name, job_identity, parameters=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/Jobs/{jobIdentity}' + path_format_arguments = { + 'accountName': self._serialize.url("account_name", account_name, 'str', skip_quote=True), + 'adlaJobDnsSuffix': self._serialize.url("self.config.adla_job_dns_suffix", self.config.adla_job_dns_suffix, 'str', skip_quote=True), + 'jobIdentity': self._serialize.url("job_identity", job_identity, '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['Content-Type'] = 'application/json; charset=utf-8' + 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 body + if parameters is not None: + body_content = self._serialize.body(parameters, 'UpdateJobParameters') + else: + body_content = None + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + 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('JobInformation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, account_name, job_identity, parameters=None, custom_headers=None, raw=False, **operation_config): + """Updates the job information for the specified job ID. (Only for use + internally with Scope job type.). + + :param account_name: The Azure Data Lake Analytics account to execute + job operations on. + :type account_name: str + :param job_identity: Job identifier. Uniquely identifies the job + across all jobs submitted to the service. + :type job_identity: str + :param parameters: The parameters to update a job. + :type parameters: + ~azure.mgmt.datalake.analytics.job.models.UpdateJobParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + JobInformation or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datalake.analytics.job.models.JobInformation] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + account_name=account_name, + job_identity=job_identity, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('JobInformation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + def list( self, account_name, filter=None, top=None, skip=None, select=None, orderby=None, count=None, custom_headers=None, raw=False, **operation_config): """Lists the jobs, if any, associated with the specified Data Lake @@ -468,10 +723,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`JobInformationBasic - ` - :rtype: :class:`JobInformationBasicPaged - ` + :return: An iterator like instance of JobInformationBasic + :rtype: + ~azure.mgmt.datalake.analytics.job.models.JobInformationBasicPaged[~azure.mgmt.datalake.analytics.job.models.JobInformationBasic] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -518,7 +772,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/pipeline_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/pipeline_operations.py index 2d483b9d84c5..fc39ff2e8f22 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/pipeline_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/pipeline_operations.py @@ -23,15 +23,17 @@ class PipelineOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-11-01". + :ivar api_version: Client Api Version. Constant value: "2017-09-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-11-01" + self.api_version = "2017-09-01-preview" self.config = config @@ -55,10 +57,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`JobPipelineInformation - ` - :rtype: :class:`JobPipelineInformationPaged - ` + :return: An iterator like instance of JobPipelineInformation + :rtype: + ~azure.mgmt.datalake.analytics.job.models.JobPipelineInformationPaged[~azure.mgmt.datalake.analytics.job.models.JobPipelineInformation] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -138,13 +139,10 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`JobPipelineInformation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobPipelineInformation - ` or - :class:`ClientRawResponse` + :return: JobPipelineInformation or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.datalake.analytics.job.models.JobPipelineInformation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -176,7 +174,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/recurrence_operations.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/recurrence_operations.py index c9d3641f372c..0d6691df01a4 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/recurrence_operations.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/operations/recurrence_operations.py @@ -23,15 +23,17 @@ class RecurrenceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-11-01". + :ivar api_version: Client Api Version. Constant value: "2017-09-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-11-01" + self.api_version = "2017-09-01-preview" self.config = config @@ -55,10 +57,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`JobRecurrenceInformation - ` - :rtype: :class:`JobRecurrenceInformationPaged - ` + :return: An iterator like instance of JobRecurrenceInformation + :rtype: + ~azure.mgmt.datalake.analytics.job.models.JobRecurrenceInformationPaged[~azure.mgmt.datalake.analytics.job.models.JobRecurrenceInformation] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -138,13 +139,10 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`JobRecurrenceInformation - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobRecurrenceInformation - ` - or :class:`ClientRawResponse` + :return: JobRecurrenceInformation or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.datalake.analytics.job.models.JobRecurrenceInformation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -176,7 +174,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/version.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/version.py index 9a6b4374370f..a410d4adb270 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/version.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.6" +VERSION = "2017-09-01-preview"