Source code for azure.purview.catalog.aio.operations._operations

# pylint: disable=too-many-lines
# 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 typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
from azure.core.polling.async_base_polling import AsyncLROBasePolling
from azure.core.rest import HttpRequest
from azure.core.tracing.decorator_async import distributed_trace_async

from ...operations._operations import build_collection_create_or_update_bulk_request, build_collection_create_or_update_request, build_collection_move_entities_to_collection_request, build_discovery_auto_complete_request, build_discovery_browse_request, build_discovery_query_request, build_discovery_suggest_request, build_entity_add_classification_request, build_entity_add_classifications_by_unique_attribute_request, build_entity_add_classifications_request, build_entity_create_or_update_entities_request, build_entity_create_or_update_request, build_entity_delete_by_guid_request, build_entity_delete_by_guids_request, build_entity_delete_by_unique_attribute_request, build_entity_delete_classification_by_unique_attribute_request, build_entity_delete_classification_request, build_entity_get_by_guid_request, build_entity_get_by_unique_attributes_request, build_entity_get_classification_request, build_entity_get_classifications_request, build_entity_get_entities_by_unique_attributes_request, build_entity_get_header_request, build_entity_list_by_guids_request, build_entity_partial_update_entity_attribute_by_guid_request, build_entity_partial_update_entity_by_unique_attributes_request, build_entity_set_classifications_request, build_entity_update_classifications_by_unique_attribute_request, build_entity_update_classifications_request, build_glossary_assign_term_to_entities_request, build_glossary_create_glossary_categories_request, build_glossary_create_glossary_category_request, build_glossary_create_glossary_request, build_glossary_create_glossary_term_request, build_glossary_create_glossary_terms_request, build_glossary_delete_glossary_category_request, build_glossary_delete_glossary_request, build_glossary_delete_glossary_term_request, build_glossary_delete_term_assignment_from_entities_request, build_glossary_export_glossary_terms_as_csv_request, build_glossary_get_detailed_glossary_request, build_glossary_get_entities_assigned_with_term_request, build_glossary_get_glossary_category_request, build_glossary_get_glossary_request, build_glossary_get_glossary_term_request, build_glossary_get_import_csv_operation_status_request, build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial, build_glossary_import_glossary_terms_via_csv_request_initial, build_glossary_list_category_terms_request, build_glossary_list_glossaries_request, build_glossary_list_glossary_categories_headers_request, build_glossary_list_glossary_categories_request, build_glossary_list_glossary_term_headers_request, build_glossary_list_glossary_terms_request, build_glossary_list_related_categories_request, build_glossary_list_related_terms_request, build_glossary_list_terms_by_glossary_name_request, build_glossary_partial_update_glossary_category_request, build_glossary_partial_update_glossary_request, build_glossary_partial_update_glossary_term_request, build_glossary_remove_term_assignment_from_entities_request, build_glossary_update_glossary_category_request, build_glossary_update_glossary_request, build_glossary_update_glossary_term_request, build_lineage_get_lineage_graph_request, build_lineage_next_page_lineage_request, build_relationship_create_request, build_relationship_delete_request, build_relationship_get_request, build_relationship_update_request, build_types_create_type_definitions_request, build_types_delete_type_by_name_request, build_types_delete_type_definitions_request, build_types_get_all_type_definitions_request, build_types_get_classification_def_by_guid_request, build_types_get_classification_def_by_name_request, build_types_get_entity_definition_by_guid_request, build_types_get_entity_definition_by_name_request, build_types_get_enum_def_by_guid_request, build_types_get_enum_def_by_name_request, build_types_get_relationship_def_by_guid_request, build_types_get_relationship_def_by_name_request, build_types_get_struct_def_by_guid_request, build_types_get_struct_def_by_name_request, build_types_get_term_template_def_by_guid_request, build_types_get_term_template_def_by_name_request, build_types_get_type_definition_by_guid_request, build_types_get_type_definition_by_name_request, build_types_list_type_definition_headers_request, build_types_update_atlas_type_definitions_request
T = TypeVar('T')
JSONType = Any
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

[docs]class EntityOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.purview.catalog.aio.PurviewCatalogClient`'s :attr:`entity` attribute. """ def __init__(self, *args, **kwargs) -> None: args = list(args) self._client = args.pop(0) if args else kwargs.pop("client") self._config = args.pop(0) if args else kwargs.pop("config") self._serialize = args.pop(0) if args else kwargs.pop("serializer") self._deserialize = args.pop(0) if args else kwargs.pop("deserializer")
[docs] @distributed_trace_async async def create_or_update( self, entity: JSONType, **kwargs: Any ) -> JSONType: """Create or update an entity in Atlas. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array<array:code:`<int>`>, array<map<string, int>>. :param entity: Atlas entity with extended information. :type entity: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. entity = { "entity": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. }, "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = entity request = build_entity_create_or_update_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def list_by_guids( self, *, guids: List[str], min_ext_info: Optional[bool] = False, ignore_relationships: Optional[bool] = False, exclude_relationship_types: Optional[List[str]] = None, **kwargs: Any ) -> JSONType: """List entities in bulk identified by its GUIDs. :keyword guids: An array of GUIDs of entities to list. :paramtype guids: list[str] :keyword min_ext_info: Whether to return minimal information for referred entities. Default value is False. :paramtype min_ext_info: bool :keyword ignore_relationships: Whether to ignore relationship attributes. Default value is False. :paramtype ignore_relationships: bool :keyword exclude_relationship_types: An array of the relationship types need to be excluded from the response. Default value is None. :paramtype exclude_relationship_types: list[str] :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "entities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } ], "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_list_by_guids_request( guids=guids, min_ext_info=min_ext_info, ignore_relationships=ignore_relationships, exclude_relationship_types=exclude_relationship_types, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_or_update_entities( self, entities: JSONType, **kwargs: Any ) -> JSONType: """Create or update entities in Atlas in bulk. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array<array:code:`<int>`>, array<map<string, int>>. :param entities: An array of entities to create or update. :type entities: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. entities = { "entities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } ], "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = entities request = build_entity_create_or_update_entities_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_by_guids( self, *, guids: List[str], **kwargs: Any ) -> JSONType: """Delete a list of entities in bulk identified by their GUIDs or unique attributes. :keyword guids: An array of GUIDs of entities to delete. :paramtype guids: list[str] :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_delete_by_guids_request( guids=guids, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def add_classification( # pylint: disable=inconsistent-return-statements self, request: JSONType, **kwargs: Any ) -> None: """Associate a classification to multiple entities in bulk. :param request: The request to associate a classification to multiple entities. :type request: JSONType :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. request = { "classification": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] }, "entityGuids": [ "str" # Optional. The GUID of the entity. ] } """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = request request = build_entity_add_classification_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def get_by_guid( self, guid: str, *, min_ext_info: Optional[bool] = False, ignore_relationships: Optional[bool] = False, **kwargs: Any ) -> JSONType: """Get complete definition of an entity given its GUID. :param guid: The globally unique identifier of the entity. :type guid: str :keyword min_ext_info: Whether to return minimal information for referred entities. Default value is False. :paramtype min_ext_info: bool :keyword ignore_relationships: Whether to ignore relationship attributes. Default value is False. :paramtype ignore_relationships: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "entity": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. }, "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_get_by_guid_request( guid=guid, min_ext_info=min_ext_info, ignore_relationships=ignore_relationships, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def partial_update_entity_attribute_by_guid( self, guid: str, body: Any, *, name: str, **kwargs: Any ) -> JSONType: """Update entity partially - create or update entity attribute identified by its GUID. Supports only primitive attribute type and entity references. It does not support updating complex types like arrays, and maps. Null updates are not possible. :param guid: The globally unique identifier of the entity. :type guid: str :param body: The value of the attribute. :type body: any :keyword name: The name of the attribute. :paramtype name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = body request = build_entity_partial_update_entity_attribute_by_guid_request( guid=guid, content_type=content_type, name=name, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Delete an entity identified by its GUID. :param guid: The globally unique identifier of the entity. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_delete_by_guid_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_classification( self, guid: str, classification_name: str, **kwargs: Any ) -> JSONType: """List classifications for a given entity represented by a GUID. :param guid: The globally unique identifier of the entity. :type guid: str :param classification_name: The name of the classification. :type classification_name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_get_classification_request( guid=guid, classification_name=classification_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_classification( # pylint: disable=inconsistent-return-statements self, guid: str, classification_name: str, **kwargs: Any ) -> None: """Delete a given classification from an existing entity represented by a GUID. :param guid: The globally unique identifier of the entity. :type guid: str :param classification_name: The name of the classification. :type classification_name: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_delete_classification_request( guid=guid, classification_name=classification_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def get_classifications( self, guid: str, **kwargs: Any ) -> JSONType: """List classifications for a given entity represented by a GUID. :param guid: The globally unique identifier of the entity. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "list": [ {} # Optional. An array of objects. ], "pageSize": 0, # Optional. The size of the page. "sortBy": "str", # Optional. The sorted by field. "sortType": "str", # Optional. to specify whether the result should be sorted? If yes, whether asc or desc. Possible values include: "NONE", "ASC", "DESC". "startIndex": 0.0, # Optional. The start index of the page. "totalCount": 0.0 # Optional. The total count of items. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_get_classifications_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def add_classifications( # pylint: disable=inconsistent-return-statements self, guid: str, classifications: List[JSONType], **kwargs: Any ) -> None: """Add classifications to an existing entity represented by a GUID. :param guid: The globally unique identifier of the entity. :type guid: str :param classifications: An array of classifications to be added. :type classifications: list[JSONType] :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. classifications = [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = classifications request = build_entity_add_classifications_request( guid=guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def update_classifications( # pylint: disable=inconsistent-return-statements self, guid: str, classifications: List[JSONType], **kwargs: Any ) -> None: """Update classifications to an existing entity represented by a guid. :param guid: The globally unique identifier of the entity. :type guid: str :param classifications: An array of classifications to be updated. :type classifications: list[JSONType] :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. classifications = [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = classifications request = build_entity_update_classifications_request( guid=guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def get_by_unique_attributes( self, type_name: str, *, min_ext_info: Optional[bool] = False, ignore_relationships: Optional[bool] = False, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> JSONType: """Get complete definition of an entity given its type and unique attribute. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:\:code:`<attrName>`=:code:`<attrValue>`. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: GET /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. :param type_name: The name of the type. :type type_name: str :keyword min_ext_info: Whether to return minimal information for referred entities. Default value is False. :paramtype min_ext_info: bool :keyword ignore_relationships: Whether to ignore relationship attributes. Default value is False. :paramtype ignore_relationships: bool :keyword attr_qualified_name: The qualified name of the entity. Default value is None. :paramtype attr_qualified_name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "entity": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. }, "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_get_by_unique_attributes_request( type_name=type_name, min_ext_info=min_ext_info, ignore_relationships=ignore_relationships, attr_qualified_name=attr_qualified_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def partial_update_entity_by_unique_attributes( self, type_name: str, atlas_entity_with_ext_info: JSONType, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> JSONType: """Update entity partially - Allow a subset of attributes to be updated on an entity which is identified by its type and unique attribute eg: Referenceable.qualifiedName. Null updates are not possible. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr::code:`<attrName>`=:code:`<attrValue>`. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: PUT /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. :param type_name: The name of the type. :type type_name: str :param atlas_entity_with_ext_info: Atlas entity with extended information. :type atlas_entity_with_ext_info: JSONType :keyword attr_qualified_name: The qualified name of the entity. Default value is None. :paramtype attr_qualified_name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. atlas_entity_with_ext_info = { "entity": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. }, "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = atlas_entity_with_ext_info request = build_entity_partial_update_entity_by_unique_attributes_request( type_name=type_name, content_type=content_type, json=_json, attr_qualified_name=attr_qualified_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_by_unique_attribute( self, type_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> JSONType: """Delete an entity identified by its type and unique attributes. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:\:code:`<attrName>`=\:code:`<attrValue>`. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. :param type_name: The name of the type. :type type_name: str :keyword attr_qualified_name: The qualified name of the entity. Default value is None. :paramtype attr_qualified_name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_delete_by_unique_attribute_request( type_name=type_name, attr_qualified_name=attr_qualified_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_classification_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, type_name: str, classification_name: str, *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> None: """Delete a given classification from an entity identified by its type and unique attributes. :param type_name: The name of the type. :type type_name: str :param classification_name: The name of the classification. :type classification_name: str :keyword attr_qualified_name: The qualified name of the entity. Default value is None. :paramtype attr_qualified_name: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_delete_classification_by_unique_attribute_request( type_name=type_name, classification_name=classification_name, attr_qualified_name=attr_qualified_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def add_classifications_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, type_name: str, atlas_classification_array: List[JSONType], *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> None: """Add classification to the entity identified by its type and unique attributes. :param type_name: The name of the type. :type type_name: str :param atlas_classification_array: An array of classification to be added. :type atlas_classification_array: list[JSONType] :keyword attr_qualified_name: The qualified name of the entity. Default value is None. :paramtype attr_qualified_name: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. atlas_classification_array = [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = atlas_classification_array request = build_entity_add_classifications_by_unique_attribute_request( type_name=type_name, content_type=content_type, json=_json, attr_qualified_name=attr_qualified_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def update_classifications_by_unique_attribute( # pylint: disable=inconsistent-return-statements self, type_name: str, atlas_classification_array: List[JSONType], *, attr_qualified_name: Optional[str] = None, **kwargs: Any ) -> None: """Update classification on an entity identified by its type and unique attributes. :param type_name: The name of the type. :type type_name: str :param atlas_classification_array: An array of classification to be updated. :type atlas_classification_array: list[JSONType] :keyword attr_qualified_name: The qualified name of the entity. Default value is None. :paramtype attr_qualified_name: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. atlas_classification_array = [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = atlas_classification_array request = build_entity_update_classifications_by_unique_attribute_request( type_name=type_name, content_type=content_type, json=_json, attr_qualified_name=attr_qualified_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def set_classifications( self, entity_headers: JSONType, **kwargs: Any ) -> List[str]: """Set classifications on entities in bulk. :param entity_headers: Atlas entity headers. :type entity_headers: JSONType :return: list of str :rtype: list[str] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. entity_headers = { "guidHeaderMap": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } } } # response body for status code(s): 200 response.json() == [ "str" # Optional. ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = entity_headers request = build_entity_set_classifications_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_entities_by_unique_attributes( self, type_name: str, *, min_ext_info: Optional[bool] = False, ignore_relationships: Optional[bool] = False, attr_n_qualified_name: Optional[str] = None, **kwargs: Any ) -> JSONType: """Bulk API to retrieve list of entities identified by its unique attributes. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format typeName=\:code:`<typeName>`&attr_1:\:code:`<attrName>`=\:code:`<attrValue>`&attr_2:\:code:`<attrName>`=\:code:`<attrValue>`&attr_3:\:code:`<attrName>`=\:code:`<attrValue>` NOTE: The attrName should be an unique attribute for the given entity-type The REST request would look something like this GET /v2/entity/bulk/uniqueAttribute/type/hive_db?attr_0:qualifiedName=db1@cl1&attr_2:qualifiedName=db2@cl1. :param type_name: The name of the type. :type type_name: str :keyword min_ext_info: Whether to return minimal information for referred entities. Default value is False. :paramtype min_ext_info: bool :keyword ignore_relationships: Whether to ignore relationship attributes. Default value is False. :paramtype ignore_relationships: bool :keyword attr_n_qualified_name: Qualified name of an entity. E.g. to find 2 entities you can set attrs_0:qualifiedName=db1@cl1&attrs_2:qualifiedName=db2@cl1. Default value is None. :paramtype attr_n_qualified_name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "entities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } ], "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_get_entities_by_unique_attributes_request( type_name=type_name, min_ext_info=min_ext_info, ignore_relationships=ignore_relationships, attr_n_qualified_name=attr_n_qualified_name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_header( self, guid: str, **kwargs: Any ) -> JSONType: """Get entity header given its GUID. :param guid: The globally unique identifier of the entity. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_entity_get_header_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs]class GlossaryOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.purview.catalog.aio.PurviewCatalogClient`'s :attr:`glossary` attribute. """ def __init__(self, *args, **kwargs) -> None: args = list(args) self._client = args.pop(0) if args else kwargs.pop("client") self._config = args.pop(0) if args else kwargs.pop("config") self._serialize = args.pop(0) if args else kwargs.pop("serializer") self._deserialize = args.pop(0) if args else kwargs.pop("deserializer")
[docs] @distributed_trace_async async def list_glossaries( self, *, limit: Optional[int] = None, offset: Optional[int] = None, sort: Optional[str] = "ASC", ignore_terms_and_categories: Optional[bool] = False, **kwargs: Any ) -> List[JSONType]: """Get all glossaries registered with Atlas. :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword sort: The sort order, ASC (default) or DESC. Default value is "ASC". :paramtype sort: str :keyword ignore_terms_and_categories: Whether ignore terms and categories. Default value is False. :paramtype ignore_terms_and_categories: bool :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_list_glossaries_request( limit=limit, offset=offset, sort=sort, ignore_terms_and_categories=ignore_terms_and_categories, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_glossary( self, atlas_glossary: JSONType, **kwargs: Any ) -> JSONType: """Create a glossary. :param atlas_glossary: Glossary definition, terms & categories can be anchored to a glossary. Using the anchor attribute when creating the Term/Category. :type atlas_glossary: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. atlas_glossary = { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } # response body for status code(s): 200 response.json() == { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = atlas_glossary request = build_glossary_create_glossary_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_glossary_categories( self, glossary_category: List[JSONType], **kwargs: Any ) -> List[JSONType]: """Create glossary category in bulk. :param glossary_category: An array of glossary category definitions to be created. :type glossary_category: list[JSONType] :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. glossary_category = [ { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } ] # response body for status code(s): 200 response.json() == [ { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = glossary_category request = build_glossary_create_glossary_categories_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_glossary_category( self, glossary_category: JSONType, **kwargs: Any ) -> JSONType: """Create a glossary category. :param glossary_category: The glossary category definition. A category must be anchored to a Glossary when creating. Optionally, terms belonging to the category and the hierarchy can also be defined during creation. :type glossary_category: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. glossary_category = { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } # response body for status code(s): 200 response.json() == { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = glossary_category request = build_glossary_create_glossary_category_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_glossary_category( self, category_guid: str, **kwargs: Any ) -> JSONType: """Get specific glossary category by its GUID. :param category_guid: The globally unique identifier of the category. :type category_guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_get_glossary_category_request( category_guid=category_guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def update_glossary_category( self, category_guid: str, glossary_category: JSONType, **kwargs: Any ) -> JSONType: """Update the given glossary category by its GUID. :param category_guid: The globally unique identifier of the category. :type category_guid: str :param glossary_category: The glossary category to be updated. :type glossary_category: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. glossary_category = { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } # response body for status code(s): 200 response.json() == { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = glossary_category request = build_glossary_update_glossary_category_request( category_guid=category_guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_glossary_category( # pylint: disable=inconsistent-return-statements self, category_guid: str, **kwargs: Any ) -> None: """Delete a glossary category. :param category_guid: The globally unique identifier of the category. :type category_guid: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_delete_glossary_category_request( category_guid=category_guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def partial_update_glossary_category( self, category_guid: str, partial_updates: Dict[str, str], **kwargs: Any ) -> JSONType: """Update the glossary category partially. :param category_guid: The globally unique identifier of the category. :type category_guid: str :param partial_updates: A map containing keys as attribute names and values as corresponding attribute values for partial update. :type partial_updates: dict[str, str] :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. partial_updates = { "str": "str" # Optional. } # response body for status code(s): 200 response.json() == { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = partial_updates request = build_glossary_partial_update_glossary_category_request( category_guid=category_guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def list_category_terms( self, category_guid: str, *, limit: Optional[int] = None, offset: Optional[int] = None, sort: Optional[str] = "ASC", **kwargs: Any ) -> List[JSONType]: """Get all terms associated with the specific category. :param category_guid: The globally unique identifier of the category. :type category_guid: str :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword sort: The sort order, ASC (default) or DESC. Default value is "ASC". :paramtype sort: str :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_list_category_terms_request( category_guid=category_guid, limit=limit, offset=offset, sort=sort, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_glossary_term( self, glossary_term: JSONType, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSONType: """Create a glossary term. :param glossary_term: The glossary term definition. A term must be anchored to a Glossary at the time of creation. Optionally it can be categorized as well. :type glossary_term: JSONType :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. glossary_term = { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } # response body for status code(s): 200 response.json() == { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = glossary_term request = build_glossary_create_glossary_term_request( content_type=content_type, json=_json, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_glossary_term( self, term_guid: str, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSONType: """Get a specific glossary term by its GUID. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_get_glossary_term_request( term_guid=term_guid, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def update_glossary_term( self, term_guid: str, glossary_term: JSONType, **kwargs: Any ) -> JSONType: """Update the given glossary term by its GUID. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :param glossary_term: The glossary term to be updated. :type glossary_term: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. glossary_term = { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } # response body for status code(s): 200 response.json() == { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = glossary_term request = build_glossary_update_glossary_term_request( term_guid=term_guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_glossary_term( # pylint: disable=inconsistent-return-statements self, term_guid: str, **kwargs: Any ) -> None: """Delete a glossary term. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_delete_glossary_term_request( term_guid=term_guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def partial_update_glossary_term( self, term_guid: str, partial_updates: Dict[str, str], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSONType: """Update the glossary term partially. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :param partial_updates: A map containing keys as attribute names and values as corresponding attribute values to be updated. :type partial_updates: dict[str, str] :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. partial_updates = { "str": "str" # Optional. } # response body for status code(s): 200 response.json() == { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = partial_updates request = build_glossary_partial_update_glossary_term_request( term_guid=term_guid, content_type=content_type, json=_json, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_glossary_terms( self, glossary_term: List[JSONType], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> List[JSONType]: """Create glossary terms in bulk. :param glossary_term: An array of glossary term definitions to be created in bulk. :type glossary_term: list[JSONType] :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. glossary_term = [ { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } ] # response body for status code(s): 200 response.json() == [ { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = glossary_term request = build_glossary_create_glossary_terms_request( content_type=content_type, json=_json, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_entities_assigned_with_term( self, term_guid: str, *, limit: Optional[int] = None, offset: Optional[int] = None, sort: Optional[str] = "ASC", **kwargs: Any ) -> List[JSONType]: """Get all related objects assigned with the specified term. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword sort: The sort order, ASC (default) or DESC. Default value is "ASC". :paramtype sort: str :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_get_entities_assigned_with_term_request( term_guid=term_guid, limit=limit, offset=offset, sort=sort, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def assign_term_to_entities( # pylint: disable=inconsistent-return-statements self, term_guid: str, related_object_ids: List[JSONType], **kwargs: Any ) -> None: """Assign the given term to the provided list of related objects. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :param related_object_ids: An array of related object IDs to which the term has to be associated. :type related_object_ids: list[JSONType] :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. related_object_ids = [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ] """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = related_object_ids request = build_glossary_assign_term_to_entities_request( term_guid=term_guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def remove_term_assignment_from_entities( # pylint: disable=inconsistent-return-statements self, term_guid: str, related_object_ids: List[JSONType], **kwargs: Any ) -> None: """Delete the term assignment for the given list of related objects. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :param related_object_ids: An array of related object IDs from which the term has to be dissociated. :type related_object_ids: list[JSONType] :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. related_object_ids = [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ] """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = related_object_ids request = build_glossary_remove_term_assignment_from_entities_request( term_guid=term_guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def delete_term_assignment_from_entities( # pylint: disable=inconsistent-return-statements self, term_guid: str, related_object_ids: List[JSONType], **kwargs: Any ) -> None: """Delete the term assignment for the given list of related objects. :param term_guid: The globally unique identifier for glossary term. :type term_guid: str :param related_object_ids: An array of related object IDs from which the term has to be dissociated. :type related_object_ids: list[JSONType] :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. related_object_ids = [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ] """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = related_object_ids request = build_glossary_delete_term_assignment_from_entities_request( term_guid=term_guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def get_glossary( self, glossary_guid: str, **kwargs: Any ) -> JSONType: """Get a specific Glossary by its GUID. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_get_glossary_request( glossary_guid=glossary_guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def update_glossary( self, glossary_guid: str, updated_glossary: JSONType, **kwargs: Any ) -> JSONType: """Update the given glossary. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :param updated_glossary: The glossary definition to be updated. :type updated_glossary: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. updated_glossary = { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } # response body for status code(s): 200 response.json() == { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = updated_glossary request = build_glossary_update_glossary_request( glossary_guid=glossary_guid, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_glossary( # pylint: disable=inconsistent-return-statements self, glossary_guid: str, **kwargs: Any ) -> None: """Delete a glossary. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_delete_glossary_request( glossary_guid=glossary_guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def list_glossary_categories( self, glossary_guid: str, *, limit: Optional[int] = None, offset: Optional[int] = None, sort: Optional[str] = "ASC", **kwargs: Any ) -> List[JSONType]: """Get the categories belonging to a specific glossary. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword sort: The sort order, ASC (default) or DESC. Default value is "ASC". :paramtype sort: str :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_list_glossary_categories_request( glossary_guid=glossary_guid, limit=limit, offset=offset, sort=sort, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def list_glossary_categories_headers( self, glossary_guid: str, *, limit: Optional[int] = None, offset: Optional[int] = None, sort: Optional[str] = "ASC", **kwargs: Any ) -> List[JSONType]: """Get the category headers belonging to a specific glossary. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword sort: The sort order, ASC (default) or DESC. Default value is "ASC". :paramtype sort: str :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_list_glossary_categories_headers_request( glossary_guid=glossary_guid, limit=limit, offset=offset, sort=sort, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_detailed_glossary( self, glossary_guid: str, *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSONType: """Get a specific glossary with detailed information. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "categoryInfo": { "str": { "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "childrenCategories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "parentCategory": { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. }, "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "termInfo": { "str": { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. The glossary term information. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } }, "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_get_detailed_glossary_request( glossary_guid=glossary_guid, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def partial_update_glossary( self, glossary_guid: str, partial_updates: Dict[str, str], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSONType: """Update the glossary partially. Some properties such as qualifiedName are not allowed to be updated. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :param partial_updates: A map containing keys as attribute names and values as corresponding attribute values. :type partial_updates: dict[str, str] :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. partial_updates = { "str": "str" # Optional. } # response body for status code(s): 200 response.json() == { "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the category header. "displayText": "str", # Optional. The display text. "parentCategoryGuid": "str", # Optional. The GUID of the parent category. "relationGuid": "str" # Optional. The GUID of the relationship. } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "guid": "str", # Optional. The GUID of the object. "language": "str", # Optional. The language of the glossary. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "qualifiedName": "str", # Optional. The qualified name of the glossary object. "shortDescription": "str", # Optional. The short version of description. "terms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "usage": "str" # Optional. The usage of the glossary. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = partial_updates request = build_glossary_partial_update_glossary_request( glossary_guid=glossary_guid, content_type=content_type, json=_json, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def list_glossary_terms( self, glossary_guid: str, *, include_term_hierarchy: Optional[bool] = False, limit: Optional[int] = None, offset: Optional[int] = None, sort: Optional[str] = "ASC", **kwargs: Any ) -> List[JSONType]: """Get terms belonging to a specific glossary. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword sort: The sort order, ASC (default) or DESC. Default value is "ASC". :paramtype sort: str :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_list_glossary_terms_request( glossary_guid=glossary_guid, include_term_hierarchy=include_term_hierarchy, limit=limit, offset=offset, sort=sort, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def list_glossary_term_headers( self, glossary_guid: str, *, limit: Optional[int] = None, offset: Optional[int] = None, sort: Optional[str] = "ASC", **kwargs: Any ) -> List[JSONType]: """Get term headers belonging to a specific glossary. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword sort: The sort order, ASC (default) or DESC. Default value is "ASC". :paramtype sort: str :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_glossary_list_glossary_term_headers_request( glossary_guid=glossary_guid, limit=limit, offset=offset, sort=sort, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
async def _import_glossary_terms_via_csv_initial( self, glossary_guid: str, files: Dict[str, Any], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSONType: cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] request = build_glossary_import_glossary_terms_via_csv_request_initial( glossary_guid=glossary_guid, api_version=api_version, content_type=content_type, files=files, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def begin_import_glossary_terms_via_csv( self, glossary_guid: str, files: Dict[str, Any], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> AsyncLROPoller[JSONType]: """Import Glossary Terms from local csv file. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :param files: Multipart input for files. See the template in our example to find the input shape. :type files: dict[str, any] :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns JSON object :rtype: ~azure.core.polling.AsyncLROPoller[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # multipart input template you can fill out and use as your `files` input. files = { "file": b'bytes' # The csv file to import glossary terms from. } # response body for status code(s): 202 response.json() == { "createTime": "str", # Optional. The created time of the record. "error": { "errorCode": 0, # Optional. Error code from async import job if fail. "errorMessage": "str" # Optional. Error message from async import job if fail. }, "id": "str", # Optional. guid string. "lastUpdateTime": "str", # Optional. The last updated time of the record. "properties": { "importedTerms": "str", # Optional. Term numbers that already imported successfully. "totalTermsDetected": "str" # Optional. Total term numbers that detected in csv. }, "status": "str" # Optional. Enum of the status of import csv operation. Possible values include: "NotStarted", "Succeeded", "Failed", "Running". } """ api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[JSONType] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: raw_result = await self._import_glossary_terms_via_csv_initial( glossary_guid=glossary_guid, files=files, include_term_hierarchy=include_term_hierarchy, api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
async def _import_glossary_terms_via_csv_by_glossary_name_initial( self, glossary_name: str, files: Dict[str, Any], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> JSONType: cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] request = build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initial( glossary_name=glossary_name, api_version=api_version, content_type=content_type, files=files, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def begin_import_glossary_terms_via_csv_by_glossary_name( self, glossary_name: str, files: Dict[str, Any], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> AsyncLROPoller[JSONType]: """Import Glossary Terms from local csv file by glossaryName. :param glossary_name: The name of the glossary. :type glossary_name: str :param files: Multipart input for files. See the template in our example to find the input shape. :type files: dict[str, any] :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns JSON object :rtype: ~azure.core.polling.AsyncLROPoller[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # multipart input template you can fill out and use as your `files` input. files = { "file": b'bytes' # The csv file to import glossary terms from. } # response body for status code(s): 202 response.json() == { "createTime": "str", # Optional. The created time of the record. "error": { "errorCode": 0, # Optional. Error code from async import job if fail. "errorMessage": "str" # Optional. Error message from async import job if fail. }, "id": "str", # Optional. guid string. "lastUpdateTime": "str", # Optional. The last updated time of the record. "properties": { "importedTerms": "str", # Optional. Term numbers that already imported successfully. "totalTermsDetected": "str" # Optional. Total term numbers that detected in csv. }, "status": "str" # Optional. Enum of the status of import csv operation. Possible values include: "NotStarted", "Succeeded", "Failed", "Running". } """ api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[JSONType] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: raw_result = await self._import_glossary_terms_via_csv_by_glossary_name_initial( glossary_name=glossary_name, files=files, include_term_hierarchy=include_term_hierarchy, api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) def get_long_running_output(pipeline_response): response = pipeline_response.http_response if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } if polling is True: polling_method = AsyncLROBasePolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: return AsyncLROPoller.from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output ) return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
[docs] @distributed_trace_async async def get_import_csv_operation_status( self, operation_guid: str, **kwargs: Any ) -> JSONType: """Get the status of import csv operation. :param operation_guid: The globally unique identifier for async operation/job. :type operation_guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "createTime": "str", # Optional. The created time of the record. "error": { "errorCode": 0, # Optional. Error code from async import job if fail. "errorMessage": "str" # Optional. Error message from async import job if fail. }, "id": "str", # Optional. guid string. "lastUpdateTime": "str", # Optional. The last updated time of the record. "properties": { "importedTerms": "str", # Optional. Term numbers that already imported successfully. "totalTermsDetected": "str" # Optional. Total term numbers that detected in csv. }, "status": "str" # Optional. Enum of the status of import csv operation. Possible values include: "NotStarted", "Succeeded", "Failed", "Running". } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str request = build_glossary_get_import_csv_operation_status_request( operation_guid=operation_guid, api_version=api_version, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def export_glossary_terms_as_csv( self, glossary_guid: str, term_guids: List[str], *, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> IO: """Export Glossary Terms as csv file. :param glossary_guid: The globally unique identifier for glossary. :type glossary_guid: str :param term_guids: An array of term guids. :type term_guids: list[str] :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: IO :rtype: IO :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. term_guids = [ "str" # Optional. ] """ cls = kwargs.pop('cls', None) # type: ClsType[IO] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = term_guids request = build_glossary_export_glossary_terms_as_csv_request( glossary_guid=glossary_guid, api_version=api_version, content_type=content_type, json=_json, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def list_terms_by_glossary_name( self, glossary_name: str, *, limit: Optional[int] = None, offset: Optional[int] = None, include_term_hierarchy: Optional[bool] = False, **kwargs: Any ) -> List[JSONType]: """Get terms by glossary name. :param glossary_name: The name of the glossary. :type glossary_name: str :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword include_term_hierarchy: Whether include term hierarchy. Default value is False. :paramtype include_term_hierarchy: bool :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "abbreviation": "str", # Optional. The abbreviation of the term. "anchor": { "displayText": "str", # Optional. The display text. "glossaryGuid": "str", # Optional. The GUID of the glossary. "relationGuid": "str" # Optional. The GUID of the relationship. }, "antonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "assignedEntities": [ { "displayText": "str", # Optional. The display text. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "guid": "str", # Optional. The GUID of the object. "relationshipAttributes": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "lastModifiedTS": "str", # Optional. ETag for concurrency control. "typeName": "str" # Optional. The name of the type. }, "relationshipGuid": "str", # Optional. The GUID of the relationship. "relationshipStatus": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "relationshipType": "str", # Optional. An array of related object IDs. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } } ], "attributes": { "str": { "str": {} # Optional. The custom attributes of the term, which is map<string,map<string,object>>."nThe key of the first layer map is term template name. } }, "categories": [ { "categoryGuid": "str", # Optional. The GUID of the category. "description": "str", # Optional. The description of the record. "displayText": "str", # Optional. The display text. "relationGuid": "str", # Optional. The GUID of the relationship. "status": "str" # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". } ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "classifies": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "examples": [ "str" # Optional. An array of examples. ], "guid": "str", # Optional. The GUID of the object. "isA": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "lastModifiedTS": "str", # Optional. ETag for concurrency control. "longDescription": "str", # Optional. The long version description. "name": "str", # Optional. The name of the glossary object. "preferredTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "preferredToTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "qualifiedName": "str", # Optional. The qualified name of the glossary object. "replacedBy": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "replacementTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "resources": [ { "displayName": "str", # Optional. Display name for url. "url": "str" # Optional. web url. http or https. } ], "seeAlso": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "shortDescription": "str", # Optional. The short version of description. "status": "str", # Optional. Status of the AtlasGlossaryTerm. Possible values include: "Draft", "Approved", "Alert", "Expired". "synonyms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "templateName": [ {} # Optional. ], "translatedTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "translationTerms": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "usage": "str", # Optional. The usage of the term. "validValues": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "validValuesFor": [ { "description": "str", # Optional. The description of the related term. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of term relationship. Possible values include: "DRAFT", "ACTIVE", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ] } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str request = build_glossary_list_terms_by_glossary_name_request( glossary_name=glossary_name, api_version=api_version, limit=limit, offset=offset, include_term_hierarchy=include_term_hierarchy, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs]class DiscoveryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.purview.catalog.aio.PurviewCatalogClient`'s :attr:`discovery` attribute. """ def __init__(self, *args, **kwargs) -> None: args = list(args) self._client = args.pop(0) if args else kwargs.pop("client") self._config = args.pop(0) if args else kwargs.pop("config") self._serialize = args.pop(0) if args else kwargs.pop("serializer") self._deserialize = args.pop(0) if args else kwargs.pop("deserializer")
[docs] @distributed_trace_async async def query( self, search_request: JSONType, **kwargs: Any ) -> JSONType: """Gets data using search. :param search_request: An object specifying the search criteria. :type search_request: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. search_request = { "facets": [ { "count": 0, # Optional. The count of the facet item. "facet": "str", # Optional. The name of the facet item. "sort": {} # Optional. Any object. } ], "filter": {}, # Optional. The filter for the search. See examples for the usage of supported filters. "keywords": "str", # Optional. The keywords applied to all searchable fields. "limit": 0, # Optional. The limit of the number of the search result. default value is 50; maximum value is 1000. "offset": 0, # Optional. The offset. The default value is 0. The maximum value is 100000. "taxonomySetting": { "assetTypes": [ "str" # Optional. ], "facet": { "count": 0, # Optional. The count of the facet item. "facet": "str", # Optional. The name of the facet item. "sort": {} # Optional. Any object. } } } # response body for status code(s): 200 response.json() == { "@search.count": 0, # Optional. The total number of search results (not the number of documents in a single page). "@search.facets": { "assetType": [ { "count": 0, # Optional. The count of the facet item. "value": "str" # Optional. The name of the facet item. } ], "classification": [ { "count": 0, # Optional. The count of the facet item. "value": "str" # Optional. The name of the facet item. } ], "classificationCategory": [ { "count": 0, # Optional. The count of the facet item. "value": "str" # Optional. The name of the facet item. } ], "contactId": [ { "count": 0, # Optional. The count of the facet item. "value": "str" # Optional. The name of the facet item. } ], "fileExtension": [ { "count": 0, # Optional. The count of the facet item. "value": "str" # Optional. The name of the facet item. } ], "label": [ { "count": 0, # Optional. The count of the facet item. "value": "str" # Optional. The name of the facet item. } ], "term": [ { "count": 0, # Optional. The count of the facet item. "value": "str" # Optional. The name of the facet item. } ] }, "value": [ { "@search.highlights": { "description": [ "str" # Optional. A highlight list that consists of index fields id ,qualifiedName, name, description, entityType. When the keyword appears in those fields, the value of the field, attached with emphasis mark, is returned as an element of @search.highlights. ], "entityType": [ "str" # Optional. A highlight list that consists of index fields id ,qualifiedName, name, description, entityType. When the keyword appears in those fields, the value of the field, attached with emphasis mark, is returned as an element of @search.highlights. ], "id": [ "str" # Optional. A highlight list that consists of index fields id ,qualifiedName, name, description, entityType. When the keyword appears in those fields, the value of the field, attached with emphasis mark, is returned as an element of @search.highlights. ], "name": [ "str" # Optional. A highlight list that consists of index fields id ,qualifiedName, name, description, entityType. When the keyword appears in those fields, the value of the field, attached with emphasis mark, is returned as an element of @search.highlights. ], "qualifiedName": [ "str" # Optional. A highlight list that consists of index fields id ,qualifiedName, name, description, entityType. When the keyword appears in those fields, the value of the field, attached with emphasis mark, is returned as an element of @search.highlights. ] }, "@search.score": 0.0, # Optional. The search score calculated by the search engine. The results are ordered by search score by default. "@search.text": "str", # Optional. The target text that contains the keyword as prefix. The keyword is wrapped with emphasis mark. "assetType": [ "str" # Optional. The asset types of the record. ], "classification": [ "str" # Optional. The classifications of the record. ], "contact": [ { "contactType": "str", # Optional. The type of the contact. It can be Expert or Owner for an entity. It can be Expert or Steward for a glossary term. "id": "str", # Optional. The GUID of the contact. "info": "str" # Optional. The description of the contact. } ], "description": "str", # Optional. The description of the record. "entityType": "str", # Optional. The type name of the record. "id": "str", # Optional. The GUID of the record. "label": [ "str" # Optional. The labels of the record. ], "name": "str", # Optional. The name of the record. "owner": "str", # Optional. The owner of the record. This is an Atlas native attribute. "qualifiedName": "str", # Optional. The qualified name of the record. "term": [ { "glossaryName": "str", # Optional. The name of the glossary which contains the term. "guid": "str", # Optional. The GUID of the term. "name": "str" # Optional. The name of the term. } ] } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = search_request request = build_discovery_query_request( api_version=api_version, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def suggest( self, suggest_request: JSONType, **kwargs: Any ) -> JSONType: """Get search suggestions by query criteria. :param suggest_request: An object specifying the suggest criteria. :type suggest_request: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. suggest_request = { "filter": {}, # Optional. The filter for the search. "keywords": "str", # Optional. The keywords applied to all fields that support suggest operation. It must be at least 1 character, and no more than 100 characters. In the index schema we defined a default suggester which lists all the supported fields and specifies a search mode. "limit": 0 # Optional. The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100. } # response body for status code(s): 200 response.json() == { "value": [ { "@search.score": 0.0, # Optional. The search score calculated by the search engine. The results are ordered by search score by default. "@search.text": "str", # Optional. The target text that contains the keyword as prefix. The keyword is wrapped with emphasis mark. "assetType": [ "str" # Optional. The asset types of the record. ], "classification": [ "str" # Optional. The classifications of the record. ], "contact": [ { "contactType": "str", # Optional. The type of the contact. It can be Expert or Owner for an entity. It can be Expert or Steward for a glossary term. "id": "str", # Optional. The GUID of the contact. "info": "str" # Optional. The description of the contact. } ], "description": "str", # Optional. The description of the record. "entityType": "str", # Optional. The type name of the record. "id": "str", # Optional. The GUID of the record. "label": [ "str" # Optional. The labels of the record. ], "name": "str", # Optional. The name of the record. "owner": "str", # Optional. The owner of the record. This is an Atlas native attribute. "qualifiedName": "str", # Optional. The qualified name of the record. "term": [ { "glossaryName": "str", # Optional. The name of the glossary which contains the term. "guid": "str", # Optional. The GUID of the term. "name": "str" # Optional. The name of the term. } ] } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = suggest_request request = build_discovery_suggest_request( api_version=api_version, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def browse( self, browse_request: JSONType, **kwargs: Any ) -> JSONType: """Browse entities by path or entity type. :param browse_request: An object specifying the browse criteria. :type browse_request: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. browse_request = { "entityType": "str", # Optional. The entity type to browse as the root level entry point. "limit": 0, # Optional. The number of browse items we hope to return. The maximum value is 10000. "offset": 0, # Optional. The offset. The default value is 0. The maximum value is 100000. "path": "str" # Optional. The path to browse the next level child entities. } # response body for status code(s): 200 response.json() == { "@search.count": 0, # Optional. The total number of browse results. "value": [ { "entityType": "str", # Optional. The type name of the record. "id": "str", # Optional. The GUID of the record. "isLeaf": bool, # Optional. If the record is a leaf entity. "name": "str", # Optional. The name of the record. "owner": [ { "contactType": "str", # Optional. The contact type of the owner. The value will be Owner. "displayName": "str", # Optional. The display name of the owner. "id": "str", # Optional. The GUID of the owner. "mail": "str" # Optional. The mail of the owner. } ], "path": "str", # Optional. The path of the record. "qualifiedName": "str" # Optional. The qualified name of the record. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = browse_request request = build_discovery_browse_request( api_version=api_version, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def auto_complete( self, auto_complete_request: JSONType, **kwargs: Any ) -> JSONType: """Get auto complete options. :param auto_complete_request: An object specifying the autocomplete criteria. :type auto_complete_request: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. auto_complete_request = { "filter": {}, # Optional. The filter for the autocomplete request. "keywords": "str", # Optional. The keywords applied to all fields that support autocomplete operation. It must be at least 1 character, and no more than 100 characters. "limit": 0 # Optional. The number of autocomplete results we hope to return. The default value is 50. The value must be a number between 1 and 100. } # response body for status code(s): 200 response.json() == { "value": [ { "queryPlusText": "str", # Optional. The completed search query text. "text": "str" # Optional. The completed term or phrase. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = auto_complete_request request = build_discovery_auto_complete_request( api_version=api_version, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs]class LineageOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.purview.catalog.aio.PurviewCatalogClient`'s :attr:`lineage` attribute. """ def __init__(self, *args, **kwargs) -> None: args = list(args) self._client = args.pop(0) if args else kwargs.pop("client") self._config = args.pop(0) if args else kwargs.pop("config") self._serialize = args.pop(0) if args else kwargs.pop("serializer") self._deserialize = args.pop(0) if args else kwargs.pop("deserializer")
[docs] @distributed_trace_async async def get_lineage_graph( self, guid: str, *, direction: str, depth: Optional[int] = 3, width: Optional[int] = 10, include_parent: Optional[bool] = None, get_derived_lineage: Optional[bool] = None, **kwargs: Any ) -> JSONType: """Get lineage info of the entity specified by GUID. :param guid: The globally unique identifier of the entity. :type guid: str :keyword direction: The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Possible values are: "BOTH", "INPUT", and "OUTPUT". :paramtype direction: str :keyword depth: The number of hops for lineage. Default value is 3. :paramtype depth: int :keyword width: The number of max expanding width in lineage. Default value is 10. :paramtype width: int :keyword include_parent: True to include the parent chain in the response. Default value is None. :paramtype include_parent: bool :keyword get_derived_lineage: True to include derived lineage in the response. Default value is None. :paramtype get_derived_lineage: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "baseEntityGuid": "str", # Optional. The GUID of the base entity. "childrenCount": 0, # Optional. The number of children node. "guidEntityMap": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } }, "includeParent": bool, # Optional. True to return the parent of the base entity. "lineageDepth": 0, # Optional. The depth of lineage. "lineageDirection": "str", # Optional. The enum of lineage direction. Possible values include: "INPUT", "OUTPUT", "BOTH". "lineageWidth": 0, # Optional. The width of lineage. "parentRelations": [ { "childEntityId": "str", # Optional. The GUID of child entity. "parentEntityId": "str", # Optional. The GUID of parent entity. "relationshipId": "str" # Optional. The GUID of relationship. } ], "relations": [ { "fromEntityId": "str", # Optional. The GUID of from-entity. "relationshipId": "str", # Optional. The GUID of relationship. "toEntityId": "str" # Optional. The GUID of to-entity. } ], "widthCounts": { "str": { "str": {} # Optional. The entity count in specific direction. } } } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_lineage_get_lineage_graph_request( guid=guid, direction=direction, depth=depth, width=width, include_parent=include_parent, get_derived_lineage=get_derived_lineage, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def next_page_lineage( self, guid: str, *, direction: str, get_derived_lineage: Optional[bool] = None, offset: Optional[int] = None, limit: Optional[int] = None, **kwargs: Any ) -> JSONType: """Return immediate next page lineage info about entity with pagination. :param guid: The globally unique identifier of the entity. :type guid: str :keyword direction: The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Possible values are: "BOTH", "INPUT", and "OUTPUT". :paramtype direction: str :keyword get_derived_lineage: True to include derived lineage in the response. Default value is None. :paramtype get_derived_lineage: bool :keyword offset: The offset for pagination purpose. Default value is None. :paramtype offset: int :keyword limit: The page size - by default there is no paging. Default value is None. :paramtype limit: int :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "baseEntityGuid": "str", # Optional. The GUID of the base entity. "childrenCount": 0, # Optional. The number of children node. "guidEntityMap": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } }, "includeParent": bool, # Optional. True to return the parent of the base entity. "lineageDepth": 0, # Optional. The depth of lineage. "lineageDirection": "str", # Optional. The enum of lineage direction. Possible values include: "INPUT", "OUTPUT", "BOTH". "lineageWidth": 0, # Optional. The width of lineage. "parentRelations": [ { "childEntityId": "str", # Optional. The GUID of child entity. "parentEntityId": "str", # Optional. The GUID of parent entity. "relationshipId": "str" # Optional. The GUID of relationship. } ], "relations": [ { "fromEntityId": "str", # Optional. The GUID of from-entity. "relationshipId": "str", # Optional. The GUID of relationship. "toEntityId": "str" # Optional. The GUID of to-entity. } ], "widthCounts": { "str": { "str": {} # Optional. The entity count in specific direction. } } } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str request = build_lineage_next_page_lineage_request( guid=guid, api_version=api_version, direction=direction, get_derived_lineage=get_derived_lineage, offset=offset, limit=limit, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs]class RelationshipOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.purview.catalog.aio.PurviewCatalogClient`'s :attr:`relationship` attribute. """ def __init__(self, *args, **kwargs) -> None: args = list(args) self._client = args.pop(0) if args else kwargs.pop("client") self._config = args.pop(0) if args else kwargs.pop("config") self._serialize = args.pop(0) if args else kwargs.pop("serializer") self._deserialize = args.pop(0) if args else kwargs.pop("deserializer")
[docs] @distributed_trace_async async def create( self, relationship: JSONType, **kwargs: Any ) -> JSONType: """Create a new relationship between entities. :param relationship: The AtlasRelationship object containing the information for the relationship to be created. :type relationship: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. relationship = { "attributes": { "str": {} # Optional. The attributes of the struct. }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "end1": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "end2": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "guid": "str", # Optional. The GUID of the relationship. "homeId": "str", # Optional. The home ID of the relationship. "label": "str", # Optional. The label of the relationship. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "status": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the relationship. } # response body for status code(s): 200 response.json() == { "attributes": { "str": {} # Optional. The attributes of the struct. }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "end1": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "end2": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "guid": "str", # Optional. The GUID of the relationship. "homeId": "str", # Optional. The home ID of the relationship. "label": "str", # Optional. The label of the relationship. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "status": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the relationship. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = relationship request = build_relationship_create_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def update( self, relationship: JSONType, **kwargs: Any ) -> JSONType: """Update an existing relationship between entities. :param relationship: The AtlasRelationship object containing the information for the relationship to be created. :type relationship: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. relationship = { "attributes": { "str": {} # Optional. The attributes of the struct. }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "end1": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "end2": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "guid": "str", # Optional. The GUID of the relationship. "homeId": "str", # Optional. The home ID of the relationship. "label": "str", # Optional. The label of the relationship. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "status": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the relationship. } # response body for status code(s): 200 response.json() == { "attributes": { "str": {} # Optional. The attributes of the struct. }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "end1": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "end2": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "guid": "str", # Optional. The GUID of the relationship. "homeId": "str", # Optional. The home ID of the relationship. "label": "str", # Optional. The label of the relationship. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "status": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the relationship. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = relationship request = build_relationship_update_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get( self, guid: str, *, extended_info: Optional[bool] = None, **kwargs: Any ) -> JSONType: """Get relationship information between entities by its GUID. :param guid: The globally unique identifier of the relationship. :type guid: str :keyword extended_info: Limits whether includes extended information. Default value is None. :paramtype extended_info: bool :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } }, "relationship": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "end1": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "end2": { "guid": "str", # Optional. The GUID of the object. "typeName": "str", # Optional. The name of the type. "uniqueAttributes": { "str": {} # Optional. The unique attributes of the object. } }, "guid": "str", # Optional. The GUID of the relationship. "homeId": "str", # Optional. The home ID of the relationship. "label": "str", # Optional. The label of the relationship. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "status": "str", # Optional. The enum of relationship status. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the relationship. } } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_relationship_get_request( guid=guid, extended_info=extended_info, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete( # pylint: disable=inconsistent-return-statements self, guid: str, **kwargs: Any ) -> None: """Delete a relationship between entities by its GUID. :param guid: The globally unique identifier of the relationship. :type guid: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_relationship_delete_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs]class TypesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.purview.catalog.aio.PurviewCatalogClient`'s :attr:`types` attribute. """ def __init__(self, *args, **kwargs) -> None: args = list(args) self._client = args.pop(0) if args else kwargs.pop("client") self._config = args.pop(0) if args else kwargs.pop("config") self._serialize = args.pop(0) if args else kwargs.pop("serializer") self._deserialize = args.pop(0) if args else kwargs.pop("deserializer")
[docs] @distributed_trace_async async def get_classification_def_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Get the classification definition for the given GUID. :param guid: The globally unique identifier of the classification. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_classification_def_by_guid_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_classification_def_by_name( self, name: str, **kwargs: Any ) -> JSONType: """Get the classification definition by its name (unique). :param name: The name of the classification. :type name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_classification_def_by_name_request( name=name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_entity_definition_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Get the Entity definition for the given GUID. :param guid: The globally unique identifier of the entity. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_entity_definition_by_guid_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_entity_definition_by_name( self, name: str, **kwargs: Any ) -> JSONType: """Get the entity definition by its name (unique). :param name: The name of the entity. :type name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_entity_definition_by_name_request( name=name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_enum_def_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Get the enum definition for the given GUID. :param guid: The globally unique identifier of the enum. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_enum_def_by_guid_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_enum_def_by_name( self, name: str, **kwargs: Any ) -> JSONType: """Get the enum definition by its name (unique). :param name: The name of the enum. :type name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_enum_def_by_name_request( name=name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_relationship_def_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Get the relationship definition for the given GUID. :param guid: The globally unique identifier of the relationship. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_relationship_def_by_guid_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_relationship_def_by_name( self, name: str, **kwargs: Any ) -> JSONType: """Get the relationship definition by its name (unique). :param name: The name of the relationship. :type name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_relationship_def_by_name_request( name=name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_struct_def_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Get the struct definition for the given GUID. :param guid: The globally unique identifier of the struct. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_struct_def_by_guid_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_struct_def_by_name( self, name: str, **kwargs: Any ) -> JSONType: """Get the struct definition by its name (unique). :param name: The name of the struct. :type name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_struct_def_by_name_request( name=name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_type_definition_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Get the type definition for the given GUID. :param guid: The globally unique identifier of the type. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_type_definition_by_guid_request( guid=guid, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_type_definition_by_name( self, name: str, **kwargs: Any ) -> JSONType: """Get the type definition by its name (unique). :param name: The name of the type. :type name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_type_definition_by_name_request( name=name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_type_by_name( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Delete API for type identified by its name. :param name: The name of the type. :type name: str :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_delete_type_by_name_request( name=name, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def get_all_type_definitions( self, *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> JSONType: """Get all type definitions in Atlas in bulk. :keyword include_term_template: Whether include termtemplatedef when return all typedefs. This is always true when search filter type=term_template. Default value is False. :paramtype include_term_template: bool :keyword type: Typedef name as search filter when get typedefs. Possible values are: "enum", "entity", "classification", "relationship", "struct", and "term_template". Default value is None. :paramtype type: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "classificationDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "entityDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "enumDefs": [ { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "relationshipDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "structDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "termTemplateDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_get_all_type_definitions_request( include_term_template=include_term_template, type=type, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_type_definitions( self, types_def: JSONType, **kwargs: Any ) -> JSONType: """Create all atlas type definitions in bulk, only new definitions will be created. Any changes to the existing definitions will be discarded. :param types_def: A composite wrapper object with corresponding lists of the type definition. :type types_def: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. types_def = { "classificationDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "entityDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "enumDefs": [ { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "relationshipDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "structDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "termTemplateDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ] } # response body for status code(s): 200 response.json() == { "classificationDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "entityDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "enumDefs": [ { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "relationshipDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "structDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "termTemplateDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = types_def request = build_types_create_type_definitions_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def update_atlas_type_definitions( self, types_def: JSONType, **kwargs: Any ) -> JSONType: """Update all types in bulk, changes detected in the type definitions would be persisted. :param types_def: A composite object that captures all type definition changes. :type types_def: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. types_def = { "classificationDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "entityDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "enumDefs": [ { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "relationshipDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "structDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "termTemplateDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ] } # response body for status code(s): 200 response.json() == { "classificationDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "entityDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "enumDefs": [ { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "relationshipDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "structDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "termTemplateDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = types_def request = build_types_update_atlas_type_definitions_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def delete_type_definitions( # pylint: disable=inconsistent-return-statements self, types_def: JSONType, **kwargs: Any ) -> None: """Delete API for all types in bulk. :param types_def: A composite object that captures all types to be deleted. :type types_def: JSONType :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. types_def = { "classificationDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "entityTypes": [ "str" # Optional. Specifying a list of entityType names in the classificationDef, ensures that classifications can"nonly be applied to those entityTypes."n"n"n.. raw:: html"n"n <ul>"n <li>Any subtypes of the entity types inherit the restriction</li>"n <li>Any classificationDef subtypes inherit the parents entityTypes restrictions</li>"n <li>Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes</li>"n <li>An empty entityTypes list when there are no parent restrictions means there are no restrictions</li>"n <li>An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions</li>"n <li>If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs</li>"n </ul>. ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "entityDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipAttributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "relationshipTypeName": "str", # Optional. The name of the relationship type. "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "serviceType": "str", # Optional. The service type. "subTypes": [ "str" # Optional. An array of sub types. ], "superTypes": [ "str" # Optional. An array of super types. ], "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "enumDefs": [ { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "defaultValue": "str", # Optional. The default value. "description": "str", # Optional. The description of the type definition. "elementDefs": [ { "description": "str", # Optional. The description of the enum element definition. "ordinal": 0.0, # Optional. The ordinal of the enum element definition. "value": "str" # Optional. The value of the enum element definition. } ], "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "relationshipDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "endDef1": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "endDef2": { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "description": "str", # Optional. The description of the relationship end definition. "isContainer": bool, # Optional. Determines if it is container. "isLegacyAttribute": bool, # Optional. Determines if it is a legacy attribute. "name": "str", # Optional. The name of the relationship end definition. "type": "str" # Optional. The type of the relationship end. }, "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "relationshipCategory": "str", # Optional. The Relationship category determines the style of relationship around containment and lifecycle."nUML terminology is used for the values."n"n:code:`<p>`"nASSOCIATION is a relationship with no containment. :code:`<br>`"nCOMPOSITION and AGGREGATION are containment relationships."n"n:code:`<p>`"nThe difference being in the lifecycles of the container and its children. In the COMPOSITION case,"nthe children cannot exist without the container. For AGGREGATION, the life cycles"nof the container and children are totally independent. Possible values include: "ASSOCIATION", "AGGREGATION", "COMPOSITION". "relationshipLabel": "str", # Optional. The label of the relationship. "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "structDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ], "termTemplateDefs": [ { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = types_def request = build_types_delete_type_definitions_request( content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if cls: return cls(pipeline_response, None, {})
[docs] @distributed_trace_async async def list_type_definition_headers( self, *, include_term_template: Optional[bool] = False, type: Optional[str] = None, **kwargs: Any ) -> List[JSONType]: """List all type definitions returned as a list of minimal information header. :keyword include_term_template: Whether include termtemplatedef when return all typedefs. This is always true when search filter type=term_template. Default value is False. :paramtype include_term_template: bool :keyword type: Typedef name as search filter when get typedefs. Possible values are: "enum", "entity", "classification", "relationship", "struct", and "term_template". Default value is None. :paramtype type: str :return: list of JSON object :rtype: list[JSONType] :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == [ { "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "guid": "str", # Optional. The GUID of the type definition. "name": "str" # Optional. The name of the type definition. } ] """ cls = kwargs.pop('cls', None) # type: ClsType[List[JSONType]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) request = build_types_list_type_definition_headers_request( include_term_template=include_term_template, type=type, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_term_template_def_by_guid( self, guid: str, **kwargs: Any ) -> JSONType: """Get the term template definition for the given GUID. :param guid: The globally unique identifier of the term template. :type guid: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str request = build_types_get_term_template_def_by_guid_request( guid=guid, api_version=api_version, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def get_term_template_def_by_name( self, name: str, **kwargs: Any ) -> JSONType: """Get the term template definition by its name (unique). :param name: The name of the term template. :type name: str :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # response body for status code(s): 200 response.json() == { "attributeDefs": [ { "cardinality": "str", # Optional. single-valued attribute or multi-valued attribute. Possible values include: "SINGLE", "LIST", "SET". "constraints": [ { "params": { "str": {} # Optional. The parameters of the constraint definition. }, "type": "str" # Optional. The type of the constraint. } ], "defaultValue": "str", # Optional. The default value of the attribute. "description": "str", # Optional. The description of the attribute. "includeInNotification": bool, # Optional. Determines if it is included in notification. "isIndexable": bool, # Optional. Determines if it is indexable. "isOptional": bool, # Optional. Determines if it is optional. "isUnique": bool, # Optional. Determines if it unique. "name": "str", # Optional. The name of the attribute. "options": { "str": "str" # Optional. The options for the attribute. }, "typeName": "str", # Optional. The name of the type. "valuesMaxCount": 0, # Optional. The maximum count of the values. "valuesMinCount": 0 # Optional. The minimum count of the values. } ], "category": "str", # Optional. The enum of type category. Possible values include: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE". "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "dateFormatter": { "availableLocales": [ "str" # Optional. An array of available locales. ], "calendar": 0.0, # Optional. The date format. "dateInstance": ..., "dateTimeInstance": ..., "instance": ..., "lenient": bool, # Optional. Determines the leniency of the date format. "numberFormat": { "availableLocales": [ "str" # Optional. The number format. ], "currency": "str", # Optional. The currency. "currencyInstance": ..., "groupingUsed": bool, # Optional. Determines if grouping is used. "instance": ..., "integerInstance": ..., "maximumFractionDigits": 0, # Optional. The maximum of fraction digits. "maximumIntegerDigits": 0, # Optional. The maximum of integer digits. "minimumFractionDigits": 0, # Optional. The minimum of fraction digits. "minimumIntegerDigits": 0, # Optional. The minimum of integer digits. "numberInstance": ..., "parseIntegerOnly": bool, # Optional. Determines if only integer is parsed. "percentInstance": ..., "roundingMode": "str" # Optional. The enum of rounding mode. Possible values include: "UP", "DOWN", "CEILING", "FLOOR", "HALF_UP", "HALF_DOWN", "HALF_EVEN", "UNNECESSARY". }, "timeInstance": ..., "timeZone": { "availableIds": [ "str" # Optional. An array of available IDs. ], "default": ..., "displayName": "str", # Optional. The display name of the timezone. "dstSavings": 0, # Optional. The value of the daylight saving time. "id": "str", # Optional. The ID of the timezone. "rawOffset": 0 # Optional. The raw offset of the timezone. } }, "description": "str", # Optional. The description of the type definition. "guid": "str", # Optional. The GUID of the type definition. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "name": "str", # Optional. The name of the type definition. "options": { "str": "str" # Optional. The options for the type definition. }, "serviceType": "str", # Optional. The service type. "typeVersion": "str", # Optional. The version of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the record. } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str request = build_types_get_term_template_def_by_name_request( name=name, api_version=api_version, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs]class CollectionOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.purview.catalog.aio.PurviewCatalogClient`'s :attr:`collection` attribute. """ def __init__(self, *args, **kwargs) -> None: args = list(args) self._client = args.pop(0) if args else kwargs.pop("client") self._config = args.pop(0) if args else kwargs.pop("config") self._serialize = args.pop(0) if args else kwargs.pop("serializer") self._deserialize = args.pop(0) if args else kwargs.pop("deserializer")
[docs] @distributed_trace_async async def create_or_update( self, collection: str, entity: JSONType, **kwargs: Any ) -> JSONType: """Creates or updates an entity to a collection. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array<array:code:`<int>`>, array<map<string, int>>. :param collection: the collection unique name. :type collection: str :param entity: Atlas entity with extended information. :type entity: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. entity = { "entity": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. }, "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = entity request = build_collection_create_or_update_request( collection=collection, api_version=api_version, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def create_or_update_bulk( self, collection: str, entities: JSONType, **kwargs: Any ) -> JSONType: """Creates or updates entities in bulk to a collection. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array<array:code:`<int>`>, array<map<string, int>>. :param collection: the collection unique name. :type collection: str :param entities: Atlas entities with extended information. :type entities: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. entities = { "entities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } ], "referredEntities": { "str": { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "contacts": { "str": [ { "id": "str", # Optional. Azure Active Directory object Id. "info": "str" # Optional. additional information to describe this contact. } ] }, "createTime": 0.0, # Optional. The created time of the record. "createdBy": "str", # Optional. The user who created the record. "guid": "str", # Optional. The GUID of the entity. "homeId": "str", # Optional. The home ID of the entity. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "provenanceType": 0.0, # Optional. Used to record the provenance of an instance of an entity or relationship. "proxy": bool, # Optional. Determines if there's a proxy. "relationshipAttributes": { "str": {} # Optional. The attributes of relationship. }, "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str", # Optional. The name of the type. "updateTime": 0.0, # Optional. The update time of the record. "updatedBy": "str", # Optional. The user who updated the record. "version": 0.0 # Optional. The version of the entity. } } } # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = entities request = build_collection_create_or_update_bulk_request( collection=collection, api_version=api_version, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized
[docs] @distributed_trace_async async def move_entities_to_collection( self, collection: str, move_entities_request: JSONType, **kwargs: Any ) -> JSONType: """Move existing entities to the target collection. :param collection: the collection unique name. :type collection: str :param move_entities_request: Entity guids to be moved to target collection. :type move_entities_request: JSONType :return: JSON object :rtype: JSONType :raises: ~azure.core.exceptions.HttpResponseError Example: .. code-block:: python # JSON input template you can fill out and use as your body input. move_entities_request = { "entityGuids": [ "str" # Optional. An array of entity guids to be moved to target collection. ] } # response body for status code(s): 200 response.json() == { "guidAssignments": { "str": "str" # Optional. A map of GUID assignments with entities. }, "mutatedEntities": { "str": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] }, "partialUpdatedEntities": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "classificationNames": [ "str" # Optional. An array of classification names. ], "classifications": [ { "attributes": { "str": {} # Optional. The attributes of the struct. }, "entityGuid": "str", # Optional. The GUID of the entity. "entityStatus": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "lastModifiedTS": "str", # Optional. ETag for concurrency control. "removePropagationsOnEntityDelete": bool, # Optional. Determines if propagations will be removed on entity deletion. "source": "str", # Optional. indicate the source who create the classification detail. "sourceDetails": { "str": {} # Optional. more detail on source information. }, "typeName": "str", # Optional. The name of the type. "validityPeriods": [ { "endTime": "str", # Optional. The end of the time boundary. "startTime": "str", # Optional. The start of the time boundary. "timeZone": "str" # Optional. The timezone of the time boundary. } ] } ], "displayText": "str", # Optional. The display text. "guid": "str", # Optional. The GUID of the record. "lastModifiedTS": "str", # Optional. ETag for concurrency control. "meaningNames": [ "str" # Optional. An array of meanings. ], "meanings": [ { "confidence": 0, # Optional. The confidence of the term assignment. "createdBy": "str", # Optional. The user who created the record. "description": "str", # Optional. The description of the term assignment. "displayText": "str", # Optional. The display text. "expression": "str", # Optional. The expression of the term assignment. "relationGuid": "str", # Optional. The GUID of the relationship. "source": "str", # Optional. The source of the term. "status": "str", # Optional. The status of terms assignment. Possible values include: "DISCOVERED", "PROPOSED", "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER". "steward": "str", # Optional. The steward of the term. "termGuid": "str" # Optional. The GUID of the term. } ], "status": "str", # Optional. Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store. Possible values include: "ACTIVE", "DELETED". "typeName": "str" # Optional. The name of the type. } ] } """ cls = kwargs.pop('cls', None) # type: ClsType[JSONType] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = move_entities_request request = build_collection_move_entities_to_collection_request( collection=collection, api_version=api_version, content_type=content_type, json=_json, ) path_format_arguments = { "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } request.url = self._client.format_url(request.url, **path_format_arguments) pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) if response.content: deserialized = response.json() else: deserialized = None if cls: return cls(pipeline_response, deserialized, {}) return deserialized