diff --git a/custom-words.txt b/custom-words.txt index 192727525971..a20dfa54dea7 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -143,6 +143,7 @@ asyncinfo asyncoperation atascada attestationcollateral +attributerule audiodata Auditd australiaeast @@ -500,6 +501,7 @@ Deallocates deallocating Deallocation debugsend +decisionrule decodable Decompounder dedicatedhsm @@ -1374,6 +1376,7 @@ policycertificates policydefinitions policyinsights policykey +policyset policysets Polybase polyfill diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_Get.json b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_Get.json new file mode 100644 index 000000000000..58b29290a398 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_Get.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "policyId": "98ed42ff-b67f-44df-8c8c-7e6b43e77055", + "api-version": "2021-07-01" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "d5496da4-9c52-402f-b067-83cc9ddea889" + }, + "body": { + "name": "policy_mycollection", + "id": "98ed42ff-b67f-44df-8c8c-7e6b43e77055", + "version": 1, + "properties": { + "description": "", + "decisionRules": [ + { + "kind": "decisionrule", + "effect": "Permit", + "dnfCondition": [ + [ + { + "attributeName": "resource.purview.collection", + "attributeValueIncludes": "mycollection" + }, + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:mycollection" + } + ] + ] + } + ], + "attributeRules": [ + { + "kind": "attributerule", + "id": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "name": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "69e520f2-5f26-4074-9fe1-5187d85ec005" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:myparentcollection" + } + ] + ] + }, + { + "kind": "attributerule", + "id": "permission:mycollection", + "name": "permission:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:mycollection" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:myparentcollection" + } + ] + ] + } + ], + "collection": { + "type": "CollectionReference", + "referenceName": "mycollection" + }, + "parentCollectionName": "myparentcollection" + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_ListAll.json b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_ListAll.json new file mode 100644 index 000000000000..a488975a1761 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_ListAll.json @@ -0,0 +1,233 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "api-version": "2021-07-01" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "8e58266a-de42-40d5-b3c4-c6a7e159cfba" + }, + "body": { + "values": [ + { + "name": "policy_mycollection", + "id": "98ed42ff-b67f-44df-8c8c-7e6b43e77055", + "version": 1, + "properties": { + "description": "", + "decisionRules": [ + { + "kind": "decisionrule", + "effect": "Permit", + "dnfCondition": [ + [ + { + "attributeName": "resource.purview.collection", + "attributeValueIncludes": "mycollection" + }, + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:mycollection" + } + ] + ] + } + ], + "attributeRules": [ + { + "kind": "attributerule", + "id": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "name": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "69e520f2-5f26-4074-9fe1-5187d85ec005" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:myparentcollection" + } + ] + ] + }, + { + "kind": "attributerule", + "id": "permission:mycollection", + "name": "permission:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:mycollection" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:myparentcollection" + } + ] + ] + } + ], + "collection": { + "type": "CollectionReference", + "referenceName": "mycollection" + }, + "parentCollectionName": "myparentcollection" + } + }, + { + "name": "policy_myparentcollection", + "id": "b69bb29e-91dc-41f5-af94-3eb86f9c45e8", + "version": 6, + "properties": { + "description": "", + "decisionRules": [ + { + "kind": "decisionrule", + "effect": "Permit", + "dnfCondition": [ + [ + { + "attributeName": "resource.purview.collection", + "attributeValueIncludes": "myparentcollection" + }, + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:myparentcollection" + } + ] + ] + } + ], + "attributeRules": [ + { + "kind": "attributerule", + "id": "purviewmetadatarole_builtin_collection-administrator:myparentcollection", + "name": "purviewmetadatarole_builtin_collection-administrator:myparentcollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "6545aabd-7f83-4e63-adc1-45dcab61d5c3" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator" + } + ] + ] + }, + { + "kind": "attributerule", + "id": "purviewmetadatarole_builtin_purview-reader:myparentcollection", + "name": "purviewmetadatarole_builtin_purview-reader:myparentcollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "6545aabd-7f83-4e63-adc1-45dcab61d5c3" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_purview-reader" + } + ] + ] + }, + { + "kind": "attributerule", + "id": "purviewmetadatarole_builtin_data-curator:myparentcollection", + "name": "purviewmetadatarole_builtin_data-curator:myparentcollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "6545aabd-7f83-4e63-adc1-45dcab61d5c3" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_data-curator" + } + ] + ] + }, + { + "kind": "attributerule", + "id": "purviewmetadatarole_builtin_data-source-administrator:myparentcollection", + "name": "purviewmetadatarole_builtin_data-source-administrator:myparentcollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "6545aabd-7f83-4e63-adc1-45dcab61d5c3" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_data-source-administrator" + } + ] + ] + }, + { + "kind": "attributerule", + "id": "permission:myparentcollection", + "name": "permission:myparentcollection", + "dnfCondition": [ + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:myparentcollection" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_purview-reader:myparentcollection" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_data-curator:myparentcollection" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_data-source-administrator:myparentcollection" + } + ] + ] + } + ], + "collection": { + "type": "CollectionReference", + "referenceName": "myparentcollection" + } + } + } + ] + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_Update.json b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_Update.json new file mode 100644 index 000000000000..3f60f60ef806 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataPolicy_Update.json @@ -0,0 +1,166 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "policyId": "98ed42ff-b67f-44df-8c8c-7e6b43e77055", + "api-version": "2021-07-01", + "body": { + "name": "policy_mycollection", + "id": "98ed42ff-b67f-44df-8c8c-7e6b43e77055", + "version": 1, + "properties": { + "description": "", + "decisionRules": [ + { + "effect": "Permit", + "dnfCondition": [ + [ + { + "attributeName": "resource.purview.collection", + "attributeValueIncludes": "mycollection" + }, + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:mycollection" + } + ] + ] + } + ], + "attributeRules": [ + { + "id": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "name": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "69e520f2-5f26-4074-9fe1-5187d85ec005", + "3f10f245-d5c4-4541-98ce-01a4580a30e0" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:myparentcollection" + } + ] + ] + }, + { + "id": "permission:mycollection", + "name": "permission:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:mycollection" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:myparentcollection" + } + ] + ] + } + ], + "collection": { + "referenceName": "mycollection" + }, + "parentCollectionName": "myparentcollection" + } + } + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "d5496da4-9c52-402f-b067-83cc9ddea888" + }, + "body": { + "name": "policy_mycollection", + "id": "98ed42ff-b67f-44df-8c8c-7e6b43e77055", + "version": 2, + "properties": { + "description": "", + "decisionRules": [ + { + "kind": "decisionrule", + "effect": "Permit", + "dnfCondition": [ + [ + { + "attributeName": "resource.purview.collection", + "attributeValueIncludes": "mycollection" + }, + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:mycollection" + } + ] + ] + } + ], + "attributeRules": [ + { + "kind": "attributerule", + "id": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "name": "purviewmetadatarole_builtin_collection-administrator:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "principal.microsoft.id", + "attributeValueIncludedIn": [ + "69e520f2-5f26-4074-9fe1-5187d85ec005", + "3f10f245-d5c4-4541-98ce-01a4580a30e0" + ] + }, + { + "attributeName": "derived.purview.role", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:myparentcollection" + } + ] + ] + }, + { + "kind": "attributerule", + "id": "permission:mycollection", + "name": "permission:mycollection", + "dnfCondition": [ + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "purviewmetadatarole_builtin_collection-administrator:mycollection" + } + ], + [ + { + "attributeName": "derived.purview.permission", + "attributeValueIncludes": "permission:myparentcollection" + } + ] + ] + } + ], + "collection": { + "type": "CollectionReference", + "referenceName": "mycollection" + }, + "parentCollectionName": "myparentcollection" + } + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataRoles_List.json b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataRoles_List.json new file mode 100644 index 000000000000..a2f2659a28f3 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/examples/MetadataRoles_List.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "api-version": "2021-07-01" + }, + "responses": { + "200": { + "headers": { + "x-ms-request-id": "8e58266a-de42-40d5-b3c4-c6a7e159cfba" + }, + "body": { + "values": [ + { + "id": "purviewmetadatarole_builtin_data-source-administrator", + "name": "data-source-administrator", + "type": "Microsoft.Purview/role", + "properties": { + "provisioningState": "Provisioned", + "roleType": "BuiltIn", + "friendlyName": "Data Source Administrator", + "cnfCondition": [ + [ + { + "attributeName": "request.azure.dataAction", + "attributeValueIncludedIn": [ + "Microsoft.Purview/accounts/scan/read", + "Microsoft.Purview/accounts/scan/write", + "Microsoft.Purview/accounts/collection/read" + ] + } + ] + ], + "version": 1 + } + }, + { + "id": "purviewmetadatarole_builtin_collection-administrator", + "name": "collection-administrator", + "type": "Microsoft.Purview/role", + "properties": { + "provisioningState": "Provisioned", + "roleType": "BuiltIn", + "friendlyName": "Collection Administrator", + "cnfCondition": [ + [ + { + "attributeName": "request.azure.dataAction", + "attributeValueIncludedIn": [ + "Microsoft.Purview/accounts/collection/read", + "Microsoft.Purview/accounts/collection/write" + ] + } + ] + ], + "version": 1 + } + }, + { + "id": "purviewmetadatarole_builtin_purview-reader", + "name": "purview-reader", + "type": "Microsoft.Purview/role", + "properties": { + "provisioningState": "Provisioned", + "roleType": "BuiltIn", + "friendlyName": "Purview Reader", + "cnfCondition": [ + [ + { + "attributeName": "request.azure.dataAction", + "attributeValueIncludedIn": [ + "Microsoft.Purview/accounts/data/read", + "Microsoft.Purview/accounts/collection/read" + ] + } + ] + ], + "version": 1 + } + }, + { + "id": "purviewmetadatarole_builtin_data-curator", + "name": "data-curator", + "type": "Microsoft.Purview/role", + "properties": { + "provisioningState": "Provisioned", + "roleType": "BuiltIn", + "friendlyName": "Data Curator", + "cnfCondition": [ + [ + { + "attributeName": "request.azure.dataAction", + "attributeValueIncludedIn": [ + "Microsoft.Purview/accounts/data/read", + "Microsoft.Purview/accounts/data/write", + "Microsoft.Purview/accounts/collection/read" + ] + } + ] + ], + "version": 1 + } + } + ] + } + } + } +} diff --git a/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/purviewMetadataPolicy.json b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/purviewMetadataPolicy.json new file mode 100644 index 000000000000..097fda8ca135 --- /dev/null +++ b/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/purviewMetadataPolicy.json @@ -0,0 +1,570 @@ +{ + "swagger": "2.0", + "info": { + "title": "Purview Metadata Policies Service REST API Document", + "version": "2021-07-01" + }, + "paths": { + "/metadataRoles": { + "get": { + "tags": [ + "MetadataRoles" + ], + "description": "Lists roles for Purview Account", + "operationId": "MetadataRoles_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MetadataRoleList" + } + }, + "default": { + "description": "An error response received from the Metadata Policy Service", + "schema": { + "$ref": "#/definitions/ErrorResponseModel" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "The error code" + } + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "MetadataRoles_List": { + "$ref": "./examples/MetadataRoles_List.json" + } + } + } + }, + "/metadataPolicies": { + "get": { + "tags": [ + "MetadataPolicy" + ], + "description": "List or Get metadata policies", + "operationId": "MetadataPolicy_ListAll", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "collectionName", + "description": "The name of an existing collection for which one policy needs to be fetched.", + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MetadataPolicyList" + } + }, + "default": { + "description": "An error response received from the Metadata Policy Service", + "schema": { + "$ref": "#/definitions/ErrorResponseModel" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "The error code" + } + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "MetadataPolicy_ListAll": { + "$ref": "./examples/MetadataPolicy_ListAll.json" + } + } + } + }, + "/metadataPolicies/{policyId}": { + "put": { + "tags": [ + "MetadataPolicy" + ], + "description": "Updates a metadata policy", + "operationId": "MetadataPolicy_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "policyId", + "description": "Unique policy id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "in": "body", + "name": "body", + "description": "Policy to be updated.", + "schema": { + "$ref": "#/definitions/MetadataPolicy" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MetadataPolicy" + } + }, + "default": { + "description": "An error response received from the Metadata Policy Service", + "schema": { + "$ref": "#/definitions/ErrorResponseModel" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "The error code" + } + } + } + }, + "x-ms-examples": { + "MetadataPolicy_Update": { + "$ref": "./examples/MetadataPolicy_Update.json" + } + } + }, + "get": { + "tags": [ + "MetadataPolicy" + ], + "description": "Gets a metadata policy", + "operationId": "MetadataPolicy_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "policyId", + "description": "Id of an existing policy that needs to be fetched.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MetadataPolicy" + } + }, + "default": { + "description": "An error response received from the Metadata Policy Service", + "schema": { + "$ref": "#/definitions/ErrorResponseModel" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "The error code" + } + } + } + }, + "x-ms-examples": { + "MetadataPolicy_Get": { + "$ref": "./examples/MetadataPolicy_Get.json" + } + } + } + } + }, + "definitions": { + "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" + } + } + } + }, + "DnfCondition": { + "description": "The dnf Condition for a rule", + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeMatcher" + } + } + }, + "CnfCondition": { + "description": "The cnf Condition for a rule", + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeMatcher" + } + } + }, + "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": "#/definitions/DnfCondition" + } + } + }, + "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": "#/definitions/DnfCondition" + } + } + }, + "CollectionReference": { + "description": "The collection reference for a policy", + "type": "object", + "properties": { + "type": { + "description": "The type of reference", + "type": "string", + "readOnly": true + }, + "referenceName": { + "description": "The name of reference", + "type": "string" + } + } + }, + "MetadataPolicyProperties": { + "type": "object", + "properties": { + "description": { + "description": "The description of policy", + "type": "string" + }, + "decisionRules": { + "description": "The DecisionRules of policy", + "type": "array", + "items": { + "$ref": "#/definitions/DecisionRule" + } + }, + "attributeRules": { + "description": "The AttributeRules of policy", + "type": "array", + "items": { + "$ref": "#/definitions/AttributeRule" + } + }, + "collection": { + "$ref": "#/definitions/CollectionReference" + }, + "parentCollectionName": { + "description": "The parent collection of the policy", + "type": "string" + } + } + }, + "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": "#/definitions/MetadataPolicyProperties" + } + } + }, + "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": "#/definitions/ErrorModel" + } + } + } + }, + "ErrorResponseModel": { + "description": "The error response model for metadata policy", + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "MetadataPolicyList": { + "description": "List of Metadata Policies", + "required": [ + "values" + ], + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/MetadataPolicy" + } + }, + "nextLink": { + "type": "string" + } + } + }, + "MetadataRoleProperties": { + "type": "object", + "properties": { + "provisioningState": { + "description": "The provisioningState of role", + "type": "string" + }, + "roleType": { + "description": "The type of role", + "type": "string" + }, + "friendlyName": { + "description": "The friendly name of role", + "type": "string" + }, + "description": { + "description": "The description of role", + "type": "string" + }, + "cnfCondition": { + "$ref": "#/definitions/CnfCondition" + }, + "dnfCondition": { + "$ref": "#/definitions/DnfCondition" + }, + "version": { + "format": "int64", + "description": "The version of role", + "type": "integer" + } + } + }, + "MetadataRole": { + "type": "object", + "properties": { + "id": { + "description": "The Id of role", + "type": "string" + }, + "name": { + "description": "The name of role", + "type": "string" + }, + "type": { + "description": "The type of role", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/MetadataRoleProperties" + } + } + }, + "MetadataRoleList": { + "description": "List of Metadata roles", + "required": [ + "values" + ], + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/MetadataRole" + } + }, + "nextLink": { + "type": "string" + } + } + } + }, + "parameters": { + "api-version": { + "in": "query", + "name": "api-version", + "description": "The api version to use.", + "required": true, + "type": "string", + "x-ms-client-name": "ApiVersion" + }, + "Endpoint": { + "in": "path", + "name": "Endpoint", + "description": "The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client", + "x-ms-skip-url-encoding": true + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + }, + "description": "Azure Active Directory OAuth2 Flow." + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + }, + "basePath": "/policyStore", + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/purview/data-plane/readme.md b/specification/purview/data-plane/readme.md index 065b8d9ca5c4..177a4442c3e8 100644 --- a/specification/purview/data-plane/readme.md +++ b/specification/purview/data-plane/readme.md @@ -57,6 +57,26 @@ modelerfour: lenient-model-deduplication: true ``` +These are the global settings for the Purview API. + +``` yaml +openapi-type: data-plane +tag: package-2021-07-01 +title: PurviewMetadataPolicyClient +``` + + +### Tag: package-2021-07-01 + +These settings apply only when `--tag=package-2021-07-01` is specified on the command line. + +``` yaml $(tag) == 'package-2021-07-01' +input-file: +- Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01/purviewMetadataPolicy.json +modelerfour: + lenient-model-deduplication: true +``` + --- # Code Generation