Class ClassificationRulesClient

java.lang.Object
com.azure.analytics.purview.scanning.ClassificationRulesClient

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

    • getWithResponse

      public Response<BinaryData> getWithResponse(String classificationRuleName, RequestOptions requestOptions)
      Get a classification rule.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      apiVersionStringYesApi Version

      Response Body Schema

      
       {
           id: String
           name: String
       }
       
      Parameters:
      classificationRuleName - The classificationRuleName parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      a classification rule along with Response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
    • createOrUpdateWithResponse

      public Response<BinaryData> createOrUpdateWithResponse(String classificationRuleName, RequestOptions requestOptions)
      Creates or Updates a classification rule.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      apiVersionStringYesApi Version

      Request Body Schema

      
       {
           id: String
           name: String
       }
       

      Response Body Schema

      
       {
           id: String
           name: String
       }
       
      Parameters:
      classificationRuleName - The classificationRuleName parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response body along with Response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
    • deleteWithResponse

      public Response<BinaryData> deleteWithResponse(String classificationRuleName, RequestOptions requestOptions)
      Deletes a classification rule.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      apiVersionStringYesApi Version

      Response Body Schema

      
       {
           id: String
           name: String
       }
       
      Parameters:
      classificationRuleName - The classificationRuleName parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response body along with Response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
    • listAll

      public PagedIterable<BinaryData> listAll(RequestOptions requestOptions)
      List classification rules in Account.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      apiVersionStringYesApi Version

      Response Body Schema

      
       {
           value: [
               {
                   id: String
                   name: String
               }
           ]
           nextLink: String
           count: Long
       }
       
      Parameters:
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
    • listVersionsByClassificationRuleName

      public PagedIterable<BinaryData> listVersionsByClassificationRuleName(String classificationRuleName, RequestOptions requestOptions)
      Lists the rule versions of a classification rule.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      apiVersionStringYesApi Version

      Response Body Schema

      
       {
           value: [
               {
                   id: String
                   name: String
               }
           ]
           nextLink: String
           count: Long
       }
       
      Parameters:
      classificationRuleName - The classificationRuleName parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
    • tagClassificationVersionWithResponse

      public Response<BinaryData> tagClassificationVersionWithResponse(String classificationRuleName, int classificationRuleVersion, RequestOptions requestOptions)
      Sets Classification Action on a specific classification rule version.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      actionStringYesThe action parameter
      apiVersionStringYesApi Version

      Response Body Schema

      
       {
           scanResultId: String
           startTime: String
           endTime: String
           status: String(Accepted/InProgress/TransientFailure/Succeeded/Failed/Canceled)
           error: {
               code: String
               message: String
               target: String
               details: [
                   {
                       code: String
                       message: String
                       target: String
                       details: [
                           (recursive schema, see above)
                       ]
                   }
               ]
           }
       }
       
      Parameters:
      classificationRuleName - The classificationRuleName parameter.
      classificationRuleVersion - The classificationRuleVersion parameter.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the response body along with Response.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.