Class CollectionClient

java.lang.Object
com.azure.analytics.purview.catalog.CollectionClient

public final class CollectionClient extends Object
Initializes a new instance of the synchronous PurviewCatalogClient type.
  • Method Details

    • createOrUpdateWithResponse

      public Response<BinaryData> createOrUpdateWithResponse(String collection, BinaryData entity, RequestOptions requestOptions)
      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<int>>, array<map<string, int>>.

      Request Body Schema

      
       {
           referredEntities: {
               String: {
                   attributes: {
                       String: Object
                   }
                   typeName: String
                   lastModifiedTS: String
                   businessAttributes: {
                       String: Object
                   }
                   classifications: [
                       {
                           attributes: {
                               String: Object
                           }
                           typeName: String
                           lastModifiedTS: String
                           entityGuid: String
                           entityStatus: String(ACTIVE/DELETED)
                           removePropagationsOnEntityDelete: Boolean
                           validityPeriods: [
                               {
                                   endTime: String
                                   startTime: String
                                   timeZone: String
                               }
                           ]
                           source: String
                           sourceDetails: {
                               String: Object
                           }
                       }
                   ]
                   createTime: Float
                   createdBy: String
                   customAttributes: {
                       String: String
                   }
                   guid: String
                   homeId: String
                   isIncomplete: Boolean
                   labels: [
                       String
                   ]
                   meanings: [
                       {
                           confidence: Integer
                           createdBy: String
                           description: String
                           displayText: String
                           expression: String
                           relationGuid: String
                           source: String
                           status: String(DISCOVERED/PROPOSED/IMPORTED/VALIDATED/DEPRECATED/OBSOLETE/OTHER)
                           steward: String
                           termGuid: String
                       }
                   ]
                   provenanceType: Float
                   proxy: Boolean
                   relationshipAttributes: {
                       String: Object
                   }
                   status: String(ACTIVE/DELETED)
                   updateTime: Float
                   updatedBy: String
                   version: Float
                   source: String
                   sourceDetails: {
                       String: Object
                   }
                   contacts: {
                       String: [
                           {
                               id: String
                               info: String
                           }
                       ]
                   }
               }
           }
           entity: (recursive schema, see entity above)
       }
       

      Response Body Schema

      
       {
           guidAssignments: {
               String: String
           }
           mutatedEntities: {
               String: [
                   {
                       attributes: {
                           String: Object
                       }
                       typeName: String
                       lastModifiedTS: String
                       classificationNames: [
                           String
                       ]
                       classifications: [
                           {
                               attributes: {
                                   String: Object
                               }
                               typeName: String
                               lastModifiedTS: String
                               entityGuid: String
                               entityStatus: String(ACTIVE/DELETED)
                               removePropagationsOnEntityDelete: Boolean
                               validityPeriods: [
                                   {
                                       endTime: String
                                       startTime: String
                                       timeZone: String
                                   }
                               ]
                               source: String
                               sourceDetails: {
                                   String: Object
                               }
                           }
                       ]
                       displayText: String
                       guid: String
                       isIncomplete: Boolean
                       labels: [
                           String
                       ]
                       meaningNames: [
                           String
                       ]
                       meanings: [
                           {
                               confidence: Integer
                               createdBy: String
                               description: String
                               displayText: String
                               expression: String
                               relationGuid: String
                               source: String
                               status: String(DISCOVERED/PROPOSED/IMPORTED/VALIDATED/DEPRECATED/OBSOLETE/OTHER)
                               steward: String
                               termGuid: String
                           }
                       ]
                       status: String(ACTIVE/DELETED)
                   }
               ]
           }
           partialUpdatedEntities: [
               (recursive schema, see above)
           ]
       }
       
      Parameters:
      collection - the collection unique name.
      entity - Atlas entity with extended information.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      entityMutationResponse along with Response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
      ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      ResourceModifiedException - thrown if the request is rejected by server on status code 409.
    • createOrUpdateBulkWithResponse

      public Response<BinaryData> createOrUpdateBulkWithResponse(String collection, BinaryData entities, RequestOptions requestOptions)
      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<int>>, array<map<string, int>>.

      Request Body Schema

      
       {
           referredEntities: {
               String: {
                   attributes: {
                       String: Object
                   }
                   typeName: String
                   lastModifiedTS: String
                   businessAttributes: {
                       String: Object
                   }
                   classifications: [
                       {
                           attributes: {
                               String: Object
                           }
                           typeName: String
                           lastModifiedTS: String
                           entityGuid: String
                           entityStatus: String(ACTIVE/DELETED)
                           removePropagationsOnEntityDelete: Boolean
                           validityPeriods: [
                               {
                                   endTime: String
                                   startTime: String
                                   timeZone: String
                               }
                           ]
                           source: String
                           sourceDetails: {
                               String: Object
                           }
                       }
                   ]
                   createTime: Float
                   createdBy: String
                   customAttributes: {
                       String: String
                   }
                   guid: String
                   homeId: String
                   isIncomplete: Boolean
                   labels: [
                       String
                   ]
                   meanings: [
                       {
                           confidence: Integer
                           createdBy: String
                           description: String
                           displayText: String
                           expression: String
                           relationGuid: String
                           source: String
                           status: String(DISCOVERED/PROPOSED/IMPORTED/VALIDATED/DEPRECATED/OBSOLETE/OTHER)
                           steward: String
                           termGuid: String
                       }
                   ]
                   provenanceType: Float
                   proxy: Boolean
                   relationshipAttributes: {
                       String: Object
                   }
                   status: String(ACTIVE/DELETED)
                   updateTime: Float
                   updatedBy: String
                   version: Float
                   source: String
                   sourceDetails: {
                       String: Object
                   }
                   contacts: {
                       String: [
                           {
                               id: String
                               info: String
                           }
                       ]
                   }
               }
           }
           entities: [
               (recursive schema, see above)
           ]
       }
       

      Response Body Schema

      
       {
           guidAssignments: {
               String: String
           }
           mutatedEntities: {
               String: [
                   {
                       attributes: {
                           String: Object
                       }
                       typeName: String
                       lastModifiedTS: String
                       classificationNames: [
                           String
                       ]
                       classifications: [
                           {
                               attributes: {
                                   String: Object
                               }
                               typeName: String
                               lastModifiedTS: String
                               entityGuid: String
                               entityStatus: String(ACTIVE/DELETED)
                               removePropagationsOnEntityDelete: Boolean
                               validityPeriods: [
                                   {
                                       endTime: String
                                       startTime: String
                                       timeZone: String
                                   }
                               ]
                               source: String
                               sourceDetails: {
                                   String: Object
                               }
                           }
                       ]
                       displayText: String
                       guid: String
                       isIncomplete: Boolean
                       labels: [
                           String
                       ]
                       meaningNames: [
                           String
                       ]
                       meanings: [
                           {
                               confidence: Integer
                               createdBy: String
                               description: String
                               displayText: String
                               expression: String
                               relationGuid: String
                               source: String
                               status: String(DISCOVERED/PROPOSED/IMPORTED/VALIDATED/DEPRECATED/OBSOLETE/OTHER)
                               steward: String
                               termGuid: String
                           }
                       ]
                       status: String(ACTIVE/DELETED)
                   }
               ]
           }
           partialUpdatedEntities: [
               (recursive schema, see above)
           ]
       }
       
      Parameters:
      collection - the collection unique name.
      entities - Atlas entities with extended information.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      entityMutationResponse along with Response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
      ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      ResourceModifiedException - thrown if the request is rejected by server on status code 409.
    • moveEntitiesToCollectionWithResponse

      public Response<BinaryData> moveEntitiesToCollectionWithResponse(String collection, BinaryData moveEntitiesRequest, RequestOptions requestOptions)
      Move existing entities to the target collection.

      Request Body Schema

      
       {
           entityGuids: [
               String
           ]
       }
       

      Response Body Schema

      
       {
           guidAssignments: {
               String: String
           }
           mutatedEntities: {
               String: [
                   {
                       attributes: {
                           String: Object
                       }
                       typeName: String
                       lastModifiedTS: String
                       classificationNames: [
                           String
                       ]
                       classifications: [
                           {
                               attributes: {
                                   String: Object
                               }
                               typeName: String
                               lastModifiedTS: String
                               entityGuid: String
                               entityStatus: String(ACTIVE/DELETED)
                               removePropagationsOnEntityDelete: Boolean
                               validityPeriods: [
                                   {
                                       endTime: String
                                       startTime: String
                                       timeZone: String
                                   }
                               ]
                               source: String
                               sourceDetails: {
                                   String: Object
                               }
                           }
                       ]
                       displayText: String
                       guid: String
                       isIncomplete: Boolean
                       labels: [
                           String
                       ]
                       meaningNames: [
                           String
                       ]
                       meanings: [
                           {
                               confidence: Integer
                               createdBy: String
                               description: String
                               displayText: String
                               expression: String
                               relationGuid: String
                               source: String
                               status: String(DISCOVERED/PROPOSED/IMPORTED/VALIDATED/DEPRECATED/OBSOLETE/OTHER)
                               steward: String
                               termGuid: String
                           }
                       ]
                       status: String(ACTIVE/DELETED)
                   }
               ]
           }
           partialUpdatedEntities: [
               (recursive schema, see above)
           ]
       }
       
      Parameters:
      collection - the collection unique name.
      moveEntitiesRequest - Entity guids to be moved to target collection.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      entityMutationResponse along with Response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
      ClientAuthenticationException - thrown if the request is rejected by server on status code 401.
      ResourceNotFoundException - thrown if the request is rejected by server on status code 404.
      ResourceModifiedException - thrown if the request is rejected by server on status code 409.