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..d5356f60b700 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/build.json @@ -0,0 +1,225 @@ +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4168", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/async-io": "~1.0.22", + "@microsoft.azure/extension": "~1.2.12", + "@types/commonmark": "^0.27.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.28", + "@types/pify": "0.0.28", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "commonmark": "^0.27.0", + "file-url": "^2.0.2", + "get-uri": "^2.0.0", + "jsonpath": "^0.2.11", + "linq-es2015": "^2.4.25", + "mocha": "3.4.2", + "mocha-typescript": "1.1.5", + "pify": "^3.0.0", + "safe-eval": "^0.3.0", + "shx": "^0.2.2", + "source-map": "^0.5.6", + "source-map-support": "^0.4.15", + "strip-bom": "^3.0.0", + "typescript": "2.5.3", + "untildify": "^3.0.2", + "urijs": "^1.18.10", + "vscode-jsonrpc": "^3.3.1", + "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", + "yargs": "^8.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest-core@2.0.4168", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "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", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.1.22", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "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.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.1.22", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.0.19", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^1.9.0", + "autorest": "^2.0.0", + "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.0.19/node_modules/@microsoft.azure/autorest.python", + "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.0.19", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "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..f7f3d6fea07f 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,8 +38,6 @@ 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) 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..963f84243c63 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl.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 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): + 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..7a6a709f7a68 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_create_or_update_parameters.py @@ -0,0 +1,48 @@ +# 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): + 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..3b5377e58a18 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_delete_parameters.py @@ -0,0 +1,40 @@ +# 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): + 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..718606ab5349 --- /dev/null +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/acl_list.py @@ -0,0 +1,34 @@ +# 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): + self.value = None 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/entity_id.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/entity_id.py index bed40f424cd2..a7cc526f9442 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 """ 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..816302752ab9 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 = { 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..861d8f2da73c 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 = { 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..9fd4d31e63e4 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. 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..ff6d511032c6 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 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..dfcac360e92a 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 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_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..1e1f49e4ca00 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 @@ -41,6 +42,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 +63,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 @@ -115,6 +117,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 +137,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 @@ -188,6 +191,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 +206,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 = { @@ -250,6 +254,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 +269,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 = { @@ -321,6 +325,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 +338,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 = { @@ -392,18 +397,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 @@ -463,18 +464,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 @@ -544,11 +541,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 @@ -618,13 +612,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 @@ -705,10 +695,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): @@ -794,13 +783,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 @@ -883,10 +869,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): @@ -972,13 +957,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 @@ -1063,10 +1044,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): @@ -1152,13 +1132,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 @@ -1248,10 +1224,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): @@ -1359,10 +1334,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): @@ -1450,13 +1424,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 @@ -1541,10 +1511,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): @@ -1630,13 +1599,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 @@ -1721,10 +1686,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): @@ -1810,13 +1774,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 @@ -1900,10 +1860,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): @@ -1993,13 +1952,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 @@ -2088,10 +2044,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): @@ -2182,13 +2137,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 @@ -2277,10 +2229,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): @@ -2386,10 +2337,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): @@ -2479,13 +2429,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 @@ -2572,10 +2519,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): @@ -2660,13 +2606,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 @@ -2748,10 +2690,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): @@ -2834,13 +2775,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 @@ -2921,10 +2858,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): @@ -3027,10 +2963,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): @@ -3137,10 +3072,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): @@ -3245,10 +3179,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): @@ -3350,10 +3283,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): @@ -3420,6 +3352,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, **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, **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 +3553,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 @@ -3518,10 +3633,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): @@ -3586,3 +3700,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, **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, **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, **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, **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