RelationshipOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PurviewCatalogClient's

<xref:relationship> attribute.

Inheritance
builtins.object
RelationshipOperations

Constructor

RelationshipOperations(*args, **kwargs)

Methods

create

Create a new relationship between entities.

delete

Delete a relationship between entities by its GUID.

get

Get relationship information between entities by its GUID.

update

Update an existing relationship between entities.

create

Create a new relationship between entities.

create(relationship: collections.abc.MutableMapping[str, Any], **kwargs: Any) -> collections.abc.MutableMapping[str, Any]

Parameters

relationship
<xref:JSON>
Required

The AtlasRelationship object containing the information for the relationship to be created.

Returns

JSON object

Return type

<xref:JSON>

Exceptions

Examples


   # 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. Known values
         are: "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. Known values
         are: "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.
   }

delete

Delete a relationship between entities by its GUID.

delete(guid: str, **kwargs: Any) -> None

Parameters

guid
str
Required

The globally unique identifier of the relationship.

Returns

None

Return type

Exceptions

get

Get relationship information between entities by its GUID.

get(guid: str, *, extended_info: Optional[bool] = None, **kwargs: Any) -> collections.abc.MutableMapping[str, Any]

Parameters

guid
str
Required

The globally unique identifier of the relationship.

extended_info
bool

Limits whether includes extended information. Default value is None.

Returns

JSON object

Return type

<xref:JSON>

Exceptions

Examples


   # 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. Known values are: "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.
               "isIncomplete": bool,  # Optional. Whether it is a shell
                 entity.
               "labels": [
                   "str"  # Optional. labels.
               ],
               "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. Known values are: "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.
                 Known values are: "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. Known
             values are: "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.
       }
   }

update

Update an existing relationship between entities.

update(relationship: collections.abc.MutableMapping[str, Any], **kwargs: Any) -> collections.abc.MutableMapping[str, Any]

Parameters

relationship
<xref:JSON>
Required

The AtlasRelationship object containing the information for the relationship to be created.

Returns

JSON object

Return type

<xref:JSON>

Exceptions

Examples


   # 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. Known values
         are: "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. Known values
         are: "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.
   }