openapi: 3.2.0 info: title: Microsoft Azure Purview Metadata Policies Service REST API… version: 2021-07-01-preview servers: - url: /policyStore security: - azure_auth: - user_impersonation tags: - name: Metadata Policy paths: /metadataPolicies: get: tags: - Metadata Policy description: List or Get metadata policies operationId: microsoftAzureMetadatapolicyListall parameters: - in: query name: collectionName description: The name of an existing collection for which one policy needs to be fetched. schema: type: string - $ref: '#/components/parameters/api-version' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MetadataPolicyList' default: description: An error response received from the Metadata Policy Service headers: x-ms-error-code: description: The error code schema: type: string content: application/json: schema: $ref: '#/components/schemas/ErrorResponseModel' x-ms-pageable: nextLinkName: nextLink itemName: values x-ms-examples: MetadataPolicy_ListAll: $ref: ./examples/MetadataPolicy_ListAll.json summary: Microsoft Azure Get Metadatapolicies /metadataPolicies/{policyId}: put: tags: - Metadata Policy description: Updates a metadata policy operationId: microsoftAzureMetadatapolicyUpdate parameters: - in: path name: policyId description: Unique policy id. required: true schema: type: string - $ref: '#/components/parameters/api-version' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MetadataPolicy' default: description: An error response received from the Metadata Policy Service headers: x-ms-error-code: description: The error code schema: type: string content: application/json: schema: $ref: '#/components/schemas/ErrorResponseModel' x-ms-examples: MetadataPolicy_Update: $ref: ./examples/MetadataPolicy_Update.json summary: Microsoft Azure Put Metadatapolicies Policyid requestBody: content: application/json: schema: $ref: '#/components/schemas/MetadataPolicy' description: Policy to be updated. get: tags: - Metadata Policy description: Gets a metadata policy operationId: microsoftAzureMetadatapolicyGet parameters: - in: path name: policyId description: Id of an existing policy that needs to be fetched. required: true schema: type: string - $ref: '#/components/parameters/api-version' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MetadataPolicy' default: description: An error response received from the Metadata Policy Service headers: x-ms-error-code: description: The error code schema: type: string content: application/json: schema: $ref: '#/components/schemas/ErrorResponseModel' x-ms-examples: MetadataPolicy_Get: $ref: ./examples/MetadataPolicy_Get.json summary: Microsoft Azure Get Metadatapolicies Policyid components: schemas: MetadataPolicyList: description: List of Metadata Policies required: - values type: object properties: values: type: array items: $ref: '#/components/schemas/MetadataPolicy' nextLink: type: string ErrorResponseModel: description: The error response model for metadata policy required: - error type: object properties: error: $ref: '#/components/schemas/ErrorModel' ErrorModel: description: The error model for metadata policy required: - code - message type: object properties: code: description: The error code type: string message: description: The error message type: string target: description: The error target type: string details: description: The error details type: array items: $ref: '#/components/schemas/ErrorModel' DecisionRule: description: The decision rule for a policy type: object properties: kind: description: The kind of rule enum: - decisionrule type: string readOnly: true x-ms-enum: name: Kind modelAsString: true effect: description: The effect for rule enum: - Deny - Permit type: string x-ms-enum: name: Decision modelAsString: true dnfCondition: $ref: '#/components/schemas/DnfCondition' MetadataPolicy: type: object properties: name: description: The name of policy type: string id: description: The id of policy type: string version: format: int32 description: The version of policy type: integer properties: $ref: '#/components/schemas/MetadataPolicyProperties' CollectionReference: description: The collection reference for a policy type: object properties: type: description: The type of reference default: CollectionReference type: string referenceName: description: The name of reference type: string DnfCondition: description: The dnf Condition for a rule type: array items: type: array items: $ref: '#/components/schemas/AttributeMatcher' AttributeRule: description: The attribute rule for a policy type: object properties: kind: description: The kind of rule enum: - attributerule type: string readOnly: true x-ms-enum: name: Kind modelAsString: true id: description: The id for rule type: string name: description: The name for rule type: string dnfCondition: $ref: '#/components/schemas/DnfCondition' AttributeMatcher: description: Attribute matcher for a rule type: object properties: attributeName: description: AttributeName type: string attributeValueIncludes: description: Value for attribute type: string attributeValueIncludedIn: description: List of values for attribute type: array items: type: string attributeValueExcludes: description: Value excluded for attribute type: string attributeValueExcludedIn: description: List of values excluded for attribute type: array items: type: string MetadataPolicyProperties: type: object properties: description: description: The description of policy type: string decisionRules: description: The DecisionRules of policy type: array items: $ref: '#/components/schemas/DecisionRule' attributeRules: description: The AttributeRules of policy type: array items: $ref: '#/components/schemas/AttributeRule' collection: $ref: '#/components/schemas/CollectionReference' parentCollectionName: description: The parent collection of the policy type: string parameters: api-version: in: query name: api-version description: The api version to use. required: true x-ms-client-name: ApiVersion schema: type: string securitySchemes: azure_auth: type: oauth2 flows: implicit: scopes: user_impersonation: impersonate your user account authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize description: Azure Active Directory OAuth2 Flow. x-ms-parameterized-host: hostTemplate: '{Endpoint}' useSchemePrefix: false parameters: - $ref: '#/components/parameters/Endpoint'