Class MetadataPolicyClient
java.lang.Object
com.azure.analytics.purview.administration.MetadataPolicyClient
Initializes a new instance of the synchronous PurviewMetadataClient type.
-
Method Summary
Modifier and TypeMethodDescriptiongetWithResponse
(String policyId, RequestOptions requestOptions) Gets a metadata policy.listAll
(RequestOptions requestOptions) List or Get metadata policies.updateWithResponse
(String policyId, RequestOptions requestOptions) Updates a metadata policy.
-
Method Details
-
listAll
List or Get metadata policies.Query Parameters
Query Parameters Name Type Required Description collectionName String No The name of an existing collection for which one policy needs to be fetched. Response Body Schema
{ values: [ { name: String id: String version: Integer properties: { description: String decisionRules: [ { kind: String(decisionrule/attributerule) effect: String(Deny/Permit) dnfCondition: [ [ { attributeName: String attributeValueIncludes: String attributeValueIncludedIn: [ String ] attributeValueExcludes: String attributeValueExcludedIn: [ String ] } ] ] } ] attributeRules: [ { kind: String(decisionrule/attributerule) id: String name: String dnfCondition: [ [ (recursive schema, see above) ] ] } ] collection: { type: String referenceName: String } parentCollectionName: String } } ] nextLink: String }
- Parameters:
requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- list of Metadata Policies as paginated response with
PagedIterable
. - 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.
-
updateWithResponse
Updates a metadata policy.Request Body Schema
{ name: String id: String version: Integer properties: { description: String decisionRules: [ { kind: String(decisionrule/attributerule) effect: String(Deny/Permit) dnfCondition: [ [ { attributeName: String attributeValueIncludes: String attributeValueIncludedIn: [ String ] attributeValueExcludes: String attributeValueExcludedIn: [ String ] } ] ] } ] attributeRules: [ { kind: String(decisionrule/attributerule) id: String name: String dnfCondition: [ [ (recursive schema, see above) ] ] } ] collection: { type: String referenceName: String } parentCollectionName: String } }
Response Body Schema
{ name: String id: String version: Integer properties: { description: String decisionRules: [ { kind: String(decisionrule/attributerule) effect: String(Deny/Permit) dnfCondition: [ [ { attributeName: String attributeValueIncludes: String attributeValueIncludedIn: [ String ] attributeValueExcludes: String attributeValueExcludedIn: [ String ] } ] ] } ] attributeRules: [ { kind: String(decisionrule/attributerule) id: String name: String dnfCondition: [ [ (recursive schema, see above) ] ] } ] collection: { type: String referenceName: String } parentCollectionName: String } }
- Parameters:
policyId
- Unique policy id.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.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.
-
getWithResponse
Gets a metadata policy.Response Body Schema
{ name: String id: String version: Integer properties: { description: String decisionRules: [ { kind: String(decisionrule/attributerule) effect: String(Deny/Permit) dnfCondition: [ [ { attributeName: String attributeValueIncludes: String attributeValueIncludedIn: [ String ] attributeValueExcludes: String attributeValueExcludedIn: [ String ] } ] ] } ] attributeRules: [ { kind: String(decisionrule/attributerule) id: String name: String dnfCondition: [ [ (recursive schema, see above) ] ] } ] collection: { type: String referenceName: String } parentCollectionName: String } }
- Parameters:
policyId
- Id of an existing policy that needs to be fetched.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a metadata policy 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.
-