├── purviewcli ├── cli │ ├── __init__.py │ ├── insight.py │ ├── relationship.py │ ├── lineage.py │ ├── search.py │ ├── policystore.py │ ├── account.py │ └── types.py ├── __init__.py └── client │ ├── settings.py │ ├── __init__.py │ ├── _relationship.py │ ├── _lineage.py │ ├── _insight.py │ └── endpoint.py ├── docker ├── requirements.txt └── Dockerfile ├── requirements.txt ├── doc ├── api_mapping.xlsx ├── image │ ├── purview_components.png │ ├── purviewcli_example.png │ ├── purviewcli_youtube.png │ ├── purviewcli_notebook.png │ ├── purviewcli_runcontainer.png │ ├── purviewcli_runcontainershell.png │ └── purviewcli_runcmdcontainershell.png ├── slides │ └── getting_started.pdf ├── commands │ ├── lineage │ │ └── main.md │ ├── search │ │ └── main.md │ ├── relationship │ │ ├── main.md │ │ ├── put.md │ │ ├── delete.md │ │ └── create.md │ ├── scan │ │ ├── deleteCredential.md │ │ ├── deleteDataSource.md │ │ ├── deleteScanRuleset.md │ │ ├── deleteKeyVault.md │ │ ├── deleteScan.md │ │ ├── deleteClassificationRule.md │ │ ├── deleteTrigger.md │ │ ├── cancelScan.md │ │ ├── putKeyVault.md │ │ ├── runScan.md │ │ ├── readKeyVault.md │ │ ├── putScan.md │ │ ├── putCredential.md │ │ ├── readScan.md │ │ ├── tagClassificationVersion.md │ │ ├── putFilter.md │ │ ├── readSystemScanRuleset.md │ │ ├── putScanRuleset.md │ │ ├── readFilters.md │ │ └── readSystemScanRulesetLatest.md │ ├── policystore │ │ ├── deleteDataPolicy.md │ │ ├── deleteDataPolicyScope.md │ │ ├── main.md │ │ └── putDataPolicyScope.md │ ├── insight │ │ ├── tagsTimeSeries.md │ │ ├── main.md │ │ └── scanStatusSummary.md │ ├── account │ │ ├── deleteResourceSetRule.md │ │ ├── deleteCollection.md │ │ ├── putResourceSetRule.md │ │ ├── getAccessKeys.md │ │ ├── getCollectionPath.md │ │ ├── regenerateAccessKeys.md │ │ ├── getChildCollectionNames.md │ │ ├── getCollection.md │ │ └── main.md │ ├── entity │ │ ├── delete.md │ │ ├── deleteBulk.md │ │ ├── addLabels.md │ │ ├── getBusinessMetadataTemplate.md │ │ ├── setLabels.md │ │ ├── deleteLabels.md │ │ ├── deleteClassification.md │ │ ├── deleteBusinessMetadata.md │ │ ├── changeCollection.md │ │ ├── importBusinessMetadata.md │ │ ├── deleteBusinessAttribute.md │ │ ├── createBulkClassification.md │ │ ├── createClassifications.md │ │ ├── putClassifications.md │ │ ├── addOrUpdateBusinessAttribute.md │ │ ├── addOrUpdateBusinessMetadata.md │ │ ├── deleteUniqueAttributeClassification.md │ │ ├── deleteUniqueAttribute.md │ │ ├── createOrUpdateCollection.md │ │ ├── readClassification.md │ │ ├── addLabelsByUniqueAttribute.md │ │ ├── putUniqueAttributeClassifications.md │ │ ├── deleteLabelsByUniqueAttribute.md │ │ ├── setLabelsByUniqueAttribute.md │ │ └── createUniqueAttributeClassifications.md │ ├── glossary │ │ ├── delete.md │ │ ├── deleteTerm.md │ │ ├── deleteCategory.md │ │ ├── readCategoryRelated.md │ │ ├── create.md │ │ ├── createCategory.md │ │ ├── put.md │ │ ├── createTerm.md │ │ ├── putCategoryPartial.md │ │ ├── putPartial.md │ │ ├── createCategories.md │ │ ├── putTermPartial.md │ │ ├── putTerm.md │ │ ├── readTermsImport.md │ │ ├── createTermsAssignedEntities.md │ │ ├── createTermsExport.md │ │ ├── readCategory.md │ │ ├── putCategory.md │ │ ├── readCategoriesHeaders.md │ │ └── deleteTermsAssignedEntities.md │ ├── types │ │ ├── deleteTypeDef.md │ │ ├── deleteTypeDefs.md │ │ └── createTypeDefs.md │ ├── share │ │ ├── deleteSentShare.md │ │ ├── registerEmail.md │ │ ├── deleteReceivedShare.md │ │ ├── deleteAsset.md │ │ ├── deleteAssetMapping.md │ │ ├── deleteSentInvitation.md │ │ ├── activateEmail.md │ │ ├── createSentShare.md │ │ ├── getSentShare.md │ │ ├── rejectReceivedInvitation.md │ │ ├── createReceivedShare.md │ │ ├── reinstateAcceptedShare.md │ │ ├── updateExpirationAcceptedShare.md │ │ ├── listReceivedAssets.md │ │ ├── createSentInvitation.md │ │ └── getAsset.md │ └── management │ │ ├── deleteAccount.md │ │ ├── defaultAccount.md │ │ ├── removeDefaultAccount.md │ │ ├── checkNameAvailability.md │ │ ├── createAccount.md │ │ ├── updateAccount.md │ │ ├── deletePrivateEndpoint.md │ │ ├── addRootCollectionAdmin.md │ │ ├── setDefaultAccount.md │ │ ├── putPrivateEndpoint.md │ │ └── listKeys.md └── boilerplate │ └── template.md ├── samples ├── json │ ├── policystore │ │ └── policy.json │ ├── search │ │ ├── filter_collection.json │ │ ├── bulk_delete_filter.json │ │ ├── filter_labels.json │ │ ├── facets.json │ │ └── filter.json │ ├── share │ │ ├── acceptedSentShare.json │ │ ├── invitation.json │ │ ├── sentShare.json │ │ ├── receivedShare.json │ │ ├── assetMapping.json │ │ └── asset.json │ ├── scan │ │ ├── scan.json │ │ ├── scan_keyvault.json │ │ ├── scan_source.json │ │ ├── scan_filter.json │ │ ├── scan_trigger.json │ │ ├── classification_rule.json │ │ ├── search_filter.json │ │ ├── search_facets.json │ │ └── scan_ruleset.json │ ├── glossary │ │ ├── glossary.json │ │ ├── entities.json │ │ ├── term.json │ │ └── terms.json │ ├── management │ │ └── account.json │ ├── graphql │ │ ├── graphql03.json │ │ ├── graphql01.json │ │ ├── graphql02.json │ │ └── graphql04.json │ ├── sources │ │ ├── PowerBI.json │ │ ├── AmazonS3.json │ │ ├── SapEcc.json │ │ ├── Teradata.json │ │ ├── Hive.json │ │ ├── Oracle.json │ │ ├── SapS4Hana.json │ │ ├── AmazonAccount.json │ │ ├── AzureSubscription.json │ │ ├── AzureResourceGroup.json │ │ ├── SqlServerDatabase.json │ │ ├── AzureDataExplorer.json │ │ ├── AdlsGen2.json │ │ ├── AzureStorage.json │ │ ├── AdlsGen1.json │ │ ├── AzureCosmosDb.json │ │ ├── AzureSqlDatabase.json │ │ ├── AzureSynapseWorkspace.json │ │ ├── AzureSqlDataWarehouse.json │ │ ├── AzureFileService.json │ │ └── sources.json │ ├── entity │ │ ├── entity.json │ │ └── entities.json │ ├── enterprise_scale │ │ ├── data_product_analytics_lz_sources.json │ │ └── data_management_lz_sources.json │ ├── credential │ │ └── credential.json │ └── relationship │ │ ├── create.json │ │ └── update.json └── csv │ ├── entities.csv │ ├── entities_to_term.csv │ └── assets.csv ├── .gitignore ├── tests └── test_search.py ├── LICENSE └── setup.py /purviewcli/cli/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker/requirements.txt: -------------------------------------------------------------------------------- 1 | purviewcli -------------------------------------------------------------------------------- /purviewcli/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.3.3" -------------------------------------------------------------------------------- /purviewcli/client/settings.py: -------------------------------------------------------------------------------- 1 | PURVIEW_NAME = None -------------------------------------------------------------------------------- /purviewcli/client/__init__.py: -------------------------------------------------------------------------------- 1 | from .client import * -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests==2.25.1 2 | docopt==0.6.2 3 | azure-identity==1.5.0 -------------------------------------------------------------------------------- /doc/api_mapping.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/api_mapping.xlsx -------------------------------------------------------------------------------- /doc/image/purview_components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/image/purview_components.png -------------------------------------------------------------------------------- /doc/image/purviewcli_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/image/purviewcli_example.png -------------------------------------------------------------------------------- /doc/image/purviewcli_youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/image/purviewcli_youtube.png -------------------------------------------------------------------------------- /doc/slides/getting_started.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/slides/getting_started.pdf -------------------------------------------------------------------------------- /doc/image/purviewcli_notebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/image/purviewcli_notebook.png -------------------------------------------------------------------------------- /doc/image/purviewcli_runcontainer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/image/purviewcli_runcontainer.png -------------------------------------------------------------------------------- /samples/json/policystore/policy.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/samples/json/policystore/policy.json -------------------------------------------------------------------------------- /doc/image/purviewcli_runcontainershell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/image/purviewcli_runcontainershell.png -------------------------------------------------------------------------------- /doc/image/purviewcli_runcmdcontainershell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tayganr/purviewcli/HEAD/doc/image/purviewcli_runcmdcontainershell.png -------------------------------------------------------------------------------- /samples/json/search/filter_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "and": [ 3 | { 4 | "collectionId": "aqhyit" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /samples/json/search/bulk_delete_filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "and": [ 3 | { 4 | "assetType": "Azure Data Lake Storage Gen2" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /samples/json/share/acceptedSentShare.json: -------------------------------------------------------------------------------- 1 | { 2 | "shareKind": "InPlace", 3 | "properties": { 4 | "expirationDate": "2023-09-24T21:02:24.695Z" 5 | } 6 | } -------------------------------------------------------------------------------- /samples/json/scan/scan.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "AdlsGen2Msi", 3 | "properties": { 4 | "scanRulesetName": "AzureStorage", 5 | "scanRulesetType": "System" 6 | } 7 | } -------------------------------------------------------------------------------- /samples/json/scan/scan_keyvault.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "baseUrl": "https://babylon-sample-kv.vault.azure.net/", 4 | "description": "This is a Key Vault" 5 | } 6 | } -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7 2 | 3 | WORKDIR /opt/app 4 | 5 | COPY . . 6 | 7 | RUN pip install --no-cache-dir purviewcli 8 | 9 | ENTRYPOINT ["tail"] 10 | 11 | CMD ["-f","/dev/null"] -------------------------------------------------------------------------------- /samples/json/scan/scan_source.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataSource2", 3 | "kind": "AdlsGen2", 4 | "properties": { 5 | "endpoint": "https://adls5965.dfs.core.windows.net/" 6 | } 7 | } -------------------------------------------------------------------------------- /samples/json/glossary/glossary.json: -------------------------------------------------------------------------------- 1 | { 2 | "longDescription": "This is a long description.", 3 | "name": "My Glossary", 4 | "qualifiedName": "My Glossary", 5 | "shortDescription": "Short description." 6 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .env/ 3 | env/ 4 | .vscode/ 5 | output/ 6 | config.ini 7 | *.pyc 8 | .DS_Store 9 | *.egg-info/ 10 | dist/ 11 | build/ 12 | .output/ 13 | testing.ipynb 14 | sandbox/ 15 | doc/boilerplate/temp 16 | ~*.xlsx -------------------------------------------------------------------------------- /samples/json/management/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "location": "eastus", 3 | "sku": { 4 | "name": "Standard", 5 | "capacity": 4 6 | }, 7 | "properties": { 8 | "managedResourceGroupName": "custom-rgname" 9 | } 10 | } -------------------------------------------------------------------------------- /samples/json/glossary/entities.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "guid": "f0a9c131-8cad-4fa9-928d-f4f6f6f60000" 4 | }, 5 | { 6 | "guid": "ac15ddc5-8fe9-4048-98ab-8916867edc06" 7 | }, 8 | { 9 | "guid": "db6fecc2-8277-4a76-8b0e-52f6f6f60000" 10 | } 11 | ] -------------------------------------------------------------------------------- /samples/json/graphql/graphql03.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": {}, 3 | "query": "{\n classificationQuery {\n classificationCategories(paginationOptions: {offset: 0, limit: 5}) {\n values {\n count\n name\n __typename\n }\n __typename\n }\n __typename\n }\n}\n" 4 | } -------------------------------------------------------------------------------- /samples/json/share/invitation.json: -------------------------------------------------------------------------------- 1 | { 2 | "invitationKind": "User", 3 | "properties": { 4 | "targetActiveDirectoryId": "72f988bf-86f1-41af-91ab-2d7cd011db47", 5 | "targetObjectId": "095354ff-cae8-44ff-8120-22ec5a941b40", 6 | "targetEmail": "tarifat@microsoft.com" 7 | } 8 | } -------------------------------------------------------------------------------- /samples/json/share/sentShare.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "description": "This is a friendly description.", 4 | "collection": { 5 | "referenceName": "pvdemo52dg4-pv", 6 | "type": "CollectionReference" 7 | } 8 | }, 9 | "shareKind": "InPlace" 10 | } -------------------------------------------------------------------------------- /samples/json/graphql/graphql01.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": {}, 3 | "query": "{\n lastUpdatedTime\n classificationQuery {\n classificationSummary {\n subscriptionsCount\n uniqueClassificationsCount\n filesClassifiedCount\n tablesClassifiedCount\n sourcesClassifiedCount\n __typename\n }\n __typename\n }\n}\n" 4 | } -------------------------------------------------------------------------------- /samples/json/sources/PowerBI.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/PowerBI", 3 | "kind": "PowerBI", 4 | "name": "PowerBI", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" 11 | } 12 | } -------------------------------------------------------------------------------- /samples/json/share/receivedShare.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "sentShareLocation": "northeurope", 4 | "invitationId": "71d43cbe-5e44-40a5-b747-4140752fce62", 5 | "collection": { 6 | "referenceName": "pvdemo52dg4-pv", 7 | "type": "CollectionReference" 8 | } 9 | }, 10 | "shareKind": "InPlace" 11 | } -------------------------------------------------------------------------------- /doc/commands/lineage/main.md: -------------------------------------------------------------------------------- 1 | # Lineage 2 | [Command Reference](../../../README.md#command-reference) > lineage 3 | 4 | ## Commands 5 | | Command | Description | 6 | | --- | --- | 7 | | [pv lineage read](./read.md) | Get lineage info of the entity specified by GUID. | 8 | | [pv lineage readNext](./readNext.md) | Return immediate next page lineage info about entity with pagination | 9 | -------------------------------------------------------------------------------- /samples/json/sources/AmazonS3.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AmazonS3", 3 | "kind": "AmazonS3", 4 | "name": "AmazonS3", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "roleARN": null, 11 | "serviceUrl": "s3://bucketname" 12 | } 13 | } -------------------------------------------------------------------------------- /samples/json/sources/SapEcc.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/SapEcc", 3 | "kind": "SapEcc", 4 | "name": "SapEcc", 5 | "properties": { 6 | "applicationServer": "application", 7 | "collection": { 8 | "referenceName": "qaomdj", 9 | "type": "CollectionReference" 10 | }, 11 | "systemNumber": "00" 12 | } 13 | } -------------------------------------------------------------------------------- /samples/json/sources/Teradata.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/Teradata", 3 | "kind": "Teradata", 4 | "name": "Teradata", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "host": "teradata.com", 11 | "parentCollection": null 12 | } 13 | } -------------------------------------------------------------------------------- /samples/json/scan/scan_filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "includeUriPrefixes": [ 4 | "https://foo.file.core.windows.net/share1/user", 5 | "https://foo.file.core.windows.net/share1/aggregated" 6 | ], 7 | "excludeUriPrefixes": [ 8 | "https://foo.file.core.windows.net/share1/user/temp" 9 | ] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/json/sources/Hive.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/Hive", 3 | "kind": "Hive", 4 | "name": "Hive", 5 | "properties": { 6 | "clusterUrl": "www", 7 | "collection": { 8 | "referenceName": "qaomdj", 9 | "type": "CollectionReference" 10 | }, 11 | "host": "www", 12 | "parentCollection": null 13 | } 14 | } -------------------------------------------------------------------------------- /samples/json/sources/Oracle.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/Oracle", 3 | "kind": "Oracle", 4 | "name": "Oracle", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "host": "www", 11 | "port": "1234", 12 | "service": "service" 13 | } 14 | } -------------------------------------------------------------------------------- /samples/json/sources/SapS4Hana.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/sap_s4_hana", 3 | "kind": "SapS4Hana", 4 | "name": "sap_s4_hana", 5 | "properties": { 6 | "applicationServer": "application", 7 | "collection": { 8 | "referenceName": "qaomdj", 9 | "type": "CollectionReference" 10 | }, 11 | "systemNumber": "00" 12 | } 13 | } -------------------------------------------------------------------------------- /samples/json/sources/AmazonAccount.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AmazonAccount", 3 | "kind": "AmazonAccount", 4 | "name": "AmazonAccount", 5 | "properties": { 6 | "awsAccountId": "123456789123", 7 | "collection": { 8 | "referenceName": "qaomdj", 9 | "type": "CollectionReference" 10 | }, 11 | "roleARN": null 12 | } 13 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureSubscription.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0", 4 | "collection": { 5 | "referenceName": "qaomdj", 6 | "type": "CollectionReference" 7 | } 8 | }, 9 | "kind": "AzureSubscription", 10 | "id": "datasources/AzureSubscription", 11 | "name": "AzureSubscription" 12 | } -------------------------------------------------------------------------------- /samples/json/entity/entity.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity": { 3 | "status": "ACTIVE", 4 | "attributes": { 5 | "description": "Hello World is a custom entity.", 6 | "name": "Hello World", 7 | "objectType": "U ", 8 | "qualifiedName": "mssql://sqlsvr.database.windows.net/sqldb/Schema/Table" 9 | }, 10 | "typeName": "azure_sql_table" 11 | } 12 | } -------------------------------------------------------------------------------- /samples/json/share/assetMapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "BlobAccount", 3 | "properties": { 4 | "assetId": "8c3538ba-e787-4823-83ab-f01de6c18289", 5 | "storageAccountResourceId": "/subscriptions/2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0/resourceGroups/pv-7643-rg/providers/Microsoft.Storage/storageAccounts/storagedatashare01", 6 | "containerName": "customer", 7 | "folder": "helloWorld", 8 | "mountPath": "" 9 | } 10 | } -------------------------------------------------------------------------------- /samples/csv/entities.csv: -------------------------------------------------------------------------------- 1 | TYPE_NAME,FULLY_QUALIFIED_NAME,DESCRIPTION 2 | azure_sql_table,mssql://pvdemofm2ie-sqlsvr.database.windows.net/pvdemofm2ie-sqldb/SalesLT/Customer,"This is a long description, hello world." 3 | azure_datalake_gen2_path,https://pvdemofm2ieadls.dfs.core.windows.net/bing/data/merged.parquet,Another description ABC. 4 | azure_datalake_gen2_path,https://pvdemofm2ieadls.dfs.core.windows.net/bing/NYCTripSmall.parquet,Another description XYZ. 5 | -------------------------------------------------------------------------------- /samples/json/sources/AzureResourceGroup.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0", 4 | "resourceGroup": "purviewlab", 5 | "collection": { 6 | "referenceName": "qaomdj", 7 | "type": "CollectionReference" 8 | } 9 | }, 10 | "kind": "AzureResourceGroup", 11 | "id": "datasources/AzureResourceGroup", 12 | "name": "AzureResourceGroup" 13 | } -------------------------------------------------------------------------------- /samples/json/search/filter_labels.json: -------------------------------------------------------------------------------- 1 | { 2 | "and": [{ 3 | "or": [{ 4 | "label": "Microsoft.Label.9FBDE396_1A24_4C79_8EDF_9254A0F35055" 5 | }] 6 | }, 7 | { 8 | "or": [{ 9 | "assetType": "Azure Data Lake Storage Gen2" 10 | }, 11 | { 12 | "assetType": "Azure SQL Database" 13 | } 14 | ] 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /doc/commands/search/main.md: -------------------------------------------------------------------------------- 1 | # Search 2 | [Command Reference](../../../README.md#command-reference) > search 3 | 4 | ## Commands 5 | | Command | Description | 6 | | --- | --- | 7 | | [pv search autoComplete](./autoComplete.md) | Get auto complete options. | 8 | | [pv search browse](./browse.md) | Browse entities by path or entity type. | 9 | | [pv search query](./query.md) | Gets data using search. | 10 | | [pv search suggest](./suggest.md) | Get search suggestions by query criteria. | 11 | -------------------------------------------------------------------------------- /samples/json/glossary/term.json: -------------------------------------------------------------------------------- 1 | { 2 | "anchor": { 3 | "glossaryGuid": "b5544147-c1c5-401c-b835-d3e93e7eaae2" 4 | }, 5 | "abbreviation": "TABC", 6 | "longDescription": "This is a long definition.", 7 | "name": "Term ABC", 8 | "qualifiedName": "Term ABC@Glossary", 9 | "resources": [ 10 | { 11 | "displayName": "Azure Purview", 12 | "url": "https://aka.ms/AzurePurview" 13 | } 14 | ], 15 | "status": "Draft" 16 | } -------------------------------------------------------------------------------- /samples/json/sources/SqlServerDatabase.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/SqlServerDatabase", 3 | "kind": "SqlServerDatabase", 4 | "name": "SqlServerDatabase", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "location": null, 11 | "resourceGroup": null, 12 | "resourceName": null, 13 | "serverEndpoint": "server", 14 | "subscriptionId": null 15 | } 16 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureDataExplorer.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AzureDataExplorer", 3 | "kind": "AzureDataExplorer", 4 | "name": "AzureDataExplorer", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "endpoint": "https://something.com", 11 | "location": null, 12 | "resourceGroup": null, 13 | "resourceName": null, 14 | "subscriptionId": null 15 | } 16 | } -------------------------------------------------------------------------------- /samples/json/enterprise_scale/data_product_analytics_lz_sources.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "properties": { 4 | "subscriptionId": "12345678-9abc-def0-0123-456789abcdef", 5 | "parentCollection": { 6 | "type": "DataSourceReference", 7 | "referenceName": "Contoso-Sales" 8 | }, 9 | "collection": null 10 | }, 11 | "kind": "AzureSubscription", 12 | "id": "datasources/AzureSubscription", 13 | "name": "AzureSubscription" 14 | } 15 | ] -------------------------------------------------------------------------------- /samples/json/share/asset.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "BlobAccount", 3 | "properties": { 4 | "storageAccountResourceId": "/subscriptions/2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0/resourceGroups/pv-7643-rg/providers/Microsoft.Storage/storageAccounts/storagedatashare01", 5 | "receiverAssetName": "MyAssetName", 6 | "paths": [ 7 | { 8 | "containerName": "products", 9 | "senderPath": "products.csv", 10 | "receiverPath": "products.csv" 11 | } 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /samples/json/sources/AdlsGen2.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AdlsGen2", 3 | "kind": "AdlsGen2", 4 | "name": "AdlsGen2", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "endpoint": "https://adls8951.dfs.core.windows.net/", 11 | "location": "brazilsouth", 12 | "resourceGroup": "purviewlab", 13 | "resourceName": "adls8951", 14 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 15 | } 16 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureStorage.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AzureStorage", 3 | "kind": "AzureStorage", 4 | "name": "AzureStorage", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "endpoint": "https://taygan.blob.core.windows.net/", 11 | "location": "westeurope", 12 | "resourceGroup": "taygan", 13 | "resourceName": "taygan", 14 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 15 | } 16 | } -------------------------------------------------------------------------------- /doc/commands/relationship/main.md: -------------------------------------------------------------------------------- 1 | # Relationship 2 | [Command Reference](../../../README.md#command-reference) > relationship 3 | 4 | ## Commands 5 | | Command | Description | 6 | | --- | --- | 7 | | [pv relationship create](./create.md) | Create a new relationship between entities. | 8 | | [pv relationship delete](./delete.md) | Delete a relationship between entities by its GUID. | 9 | | [pv relationship put](./put.md) | Update an existing relationship between entities. | 10 | | [pv relationship read](./read.md) | Get relationship information between entities by its GUID. | 11 | -------------------------------------------------------------------------------- /samples/json/sources/AdlsGen1.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AdlsGen1", 3 | "kind": "AdlsGen1", 4 | "name": "AdlsGen1", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "endpoint": "https://adlsgenone8951.azuredatalakestore.net/webhdfs/v1/", 11 | "location": "eastus2", 12 | "resourceGroup": "purviewlab", 13 | "resourceName": "adlsgenone8951", 14 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 15 | } 16 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureCosmosDb.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AzureCosmosDb", 3 | "kind": "AzureCosmosDb", 4 | "name": "AzureCosmosDb", 5 | "properties": { 6 | "accountUri": "https://cosmos8951.documents.azure.com:443/", 7 | "collection": { 8 | "referenceName": "qaomdj", 9 | "type": "CollectionReference" 10 | }, 11 | "location": "brazilsouth", 12 | "resourceGroup": "purviewlab", 13 | "resourceName": "cosmos8951", 14 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 15 | } 16 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureSqlDatabase.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AzureSqlDatabase", 3 | "kind": "AzureSqlDatabase", 4 | "name": "AzureSqlDatabase", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "location": "brazilsouth", 11 | "resourceGroup": "synapsemg8951", 12 | "resourceName": "synapsews8951", 13 | "serverEndpoint": "synapsews8951.database.windows.net", 14 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 15 | } 16 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureSynapseWorkspace.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "dedicatedSqlEndpoint": "synapsews8951.sql.azuresynapse.net", 4 | "serverlessSqlEndpoint": "synapsews8951-ondemand.sql.azuresynapse.net", 5 | "resourceGroup": "purviewlab", 6 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0", 7 | "location": "brazilsouth", 8 | "resourceName": "synapsews8951", 9 | "collection": null 10 | }, 11 | "kind": "AzureSynapseWorkspace", 12 | "id": "datasources/AzureSynapseWorkspace", 13 | "name": "AzureSynapseWorkspace" 14 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureSqlDataWarehouse.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AzureSqlDataWarehouse", 3 | "kind": "AzureSqlDataWarehouse", 4 | "name": "AzureSqlDataWarehouse", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "location": "brazilsouth", 11 | "resourceGroup": "synapsemg8951", 12 | "resourceName": "synapsews8951", 13 | "serverEndpoint": "synapsews8951.database.windows.net", 14 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 15 | } 16 | } -------------------------------------------------------------------------------- /samples/json/sources/AzureFileService.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "datasources/AzureFileService", 3 | "kind": "AzureFileService", 4 | "name": "AzureFileService", 5 | "properties": { 6 | "collection": { 7 | "referenceName": "qaomdj", 8 | "type": "CollectionReference" 9 | }, 10 | "endpoint": "https://scanbrazilsouthcrkbyzq.file.core.windows.net/", 11 | "location": "brazilsouth", 12 | "resourceGroup": "managed-rg-twyqlvx", 13 | "resourceName": "scanbrazilsouthcrkbyzq", 14 | "subscriptionId": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 15 | } 16 | } -------------------------------------------------------------------------------- /samples/csv/entities_to_term.csv: -------------------------------------------------------------------------------- 1 | guid,qualifiedName,termFormalName 2 | c30f71d4-8321-42fa-98c0-2cf6f6f60003,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/ProductModel#CatalogDescription,Workplace Analytics_Adjusted meeting hours_Child Term 3 | c30f71d4-8321-42fa-98c0-2cf6f6f60005,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/ProductModel#ModifiedDate,Workplace Analytics_Collaborator group 4 | c30f71d4-8321-42fa-98c0-2cf6f6f60001,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/ProductModel#ProductModelID,Workplace Analytics_Adjusted meeting hours_Child Term 5 | -------------------------------------------------------------------------------- /purviewcli/cli/insight.py: -------------------------------------------------------------------------------- 1 | """ 2 | usage: 3 | pv insight assetDistribution 4 | pv insight filesAggregation 5 | pv insight filesWithoutResourceSet 6 | pv insight scanStatusSummary [--numberOfDays=] 7 | pv insight scanStatusSummaryByTs [--numberOfDays=] 8 | pv insight tags 9 | pv insight tagsTimeSeries 10 | 11 | options: 12 | --purviewName= [string] Azure Purview account name. 13 | --numberOfDays= [integer] Trailing time period in days [default: 30]. 14 | 15 | """ 16 | from docopt import docopt 17 | 18 | if __name__ == '__main__': 19 | arguments = docopt(__doc__) 20 | -------------------------------------------------------------------------------- /samples/json/graphql/graphql02.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "startTime": "2021-06-26T00:00:00.000Z", 4 | "endTime": "2021-07-31T11:46:12.413Z", 5 | "localTimeFixedPoint": "2021-07-30T23:00:00.000Z" 6 | }, 7 | "query": "query ($startTime: DateTime!, $endTime: DateTime!, $localTimeFixedPoint: DateTime!) {\n classificationQuery {\n sourcesClassifiedOverTimeData(timeRequestOptions: {startTime: $startTime, endTime: $endTime}, localTimeFixedPoint: $localTimeFixedPoint) {\n values {\n name\n counts\n __typename\n }\n timeBuckets\n __typename\n }\n __typename\n }\n}\n" 8 | } -------------------------------------------------------------------------------- /samples/json/credential/credential.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dummy", 3 | "properties": { 4 | "description": "", 5 | "type": "BasicAuth", 6 | "typeProperties": { 7 | "password": { 8 | "secretName": "dummy", 9 | "secretVersion": "", 10 | "store": { 11 | "referenceName": "babylon", 12 | "type": "LinkedServiceReference" 13 | }, 14 | "type": "AzureKeyVaultSecret" 15 | }, 16 | "user": "dummy" 17 | } 18 | }, 19 | "type": "Microsoft.Purview/accounts/credentials" 20 | } 21 | -------------------------------------------------------------------------------- /samples/json/relationship/create.json: -------------------------------------------------------------------------------- 1 | { 2 | "end1": { 3 | "typeName": "adf_copy_activity", 4 | "uniqueAttributes": { 5 | "qualifiedName": "/subscriptions/2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0/resourceGroups/purviewlab/providers/Microsoft.DataFactory/factories/adf8951/pipelines/copyPipeline/activities/copyActivity" 6 | } 7 | }, 8 | "end2": { 9 | "typeName": "azure_sql_table", 10 | "uniqueAttributes": { 11 | "qualifiedName": "mssql://sqlsvr8951.database.windows.net/sqldb8951/SalesLT/SalesOrderDetail" 12 | } 13 | }, 14 | "status": "ACTIVE", 15 | "typeName": "process_dataset_outputs" 16 | } -------------------------------------------------------------------------------- /samples/json/scan/scan_trigger.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "recurrenceInterval": null, 4 | "scanLevel": "Incremental", 5 | "recurrence": { 6 | "startTime": "2021-02-12T14:59:00.416Z", 7 | "endTime": "2021-02-25T00:00:00.000Z", 8 | "interval": 1, 9 | "frequency": "Month", 10 | "schedule": { 11 | "hours": [ 12 | 23 13 | ], 14 | "minutes": [ 15 | 56 16 | ], 17 | "monthDays": [ 18 | 10 19 | ] 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /samples/json/scan/classification_rule.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Custom", 3 | "properties": { 4 | "description": "Let's put a cool desc here", 5 | "classificationName": "MICROSOFT.FINANCIAL.AUSTRALIA.BANK_ACCOUNT_NUMBER", 6 | "columnPatterns": [ 7 | { 8 | "pattern": "^data$", 9 | "kind": "Regex" 10 | } 11 | ], 12 | "dataPatterns": [ 13 | { 14 | "pattern": "^[0-9]{2}-[0-9]{4}-[0-9]{6}-[0-9]{3}$", 15 | "kind": "Regex" 16 | } 17 | ], 18 | "minimumPercentageMatch": 60, 19 | "ruleStatus": "Enabled" 20 | } 21 | } -------------------------------------------------------------------------------- /doc/boilerplate/template.md: -------------------------------------------------------------------------------- 1 | # pv {{COMMAND}} {{ACTION}} 2 | [Command Reference](../../../README.md#command-reference) > [{{COMMAND}}](./main.md) > {{ACTION}} 3 | 4 | ## Description 5 | {{DESCRIPTION}} 6 | 7 | ## Syntax 8 | ``` 9 | {{SYNTAX}} 10 | ``` 11 | 12 | ## Required Arguments 13 | {{REQUIRED_ARGS}} 14 | 15 | ## Optional Arguments 16 | {{OPTIONAL_ARGS}} 17 | 18 | ## API Mapping 19 | {{H1}} > {{H2}} > [{{H3}}]({{DOC_LINK}}) 20 | ``` 21 | {{METHOD}} {{ENDPOINT}} 22 | ``` 23 | 24 | ## Examples 25 | DESCRIBE_EXAMPLE. 26 | ```powershell 27 | EXAMPLE_COMMAND 28 | ``` 29 |
Example payload. 30 |

31 | 32 | ```json 33 | PASTE_JSON_HERE 34 | ``` 35 |

36 |
-------------------------------------------------------------------------------- /doc/commands/scan/deleteCredential.md: -------------------------------------------------------------------------------- 1 | # pv credential delete 2 | [Command Reference](../../../README.md#command-reference) > [credential](./main.md) > delete 3 | 4 | ## Description 5 | Delete a credential. 6 | 7 | ## Syntax 8 | ``` 9 | pv scan deleteCredential --credentialName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--credentialName` (string) 14 | The name of the credential. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Create or update a credential. 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/scan/credentials/{credentialName} 23 | ``` 24 | 25 | ## Examples 26 | ```powershell 27 | pv scan deleteCredential --credentialName "credential-SQL" 28 | ``` -------------------------------------------------------------------------------- /tests/test_search.py: -------------------------------------------------------------------------------- 1 | import os 2 | import unittest 3 | from purviewcli.client import _search 4 | 5 | class TestSearch(unittest.TestCase): 6 | PURVIEW_NAME = None 7 | 8 | def test_query(self): 9 | args = { 10 | '--keywords': '*', 11 | '--limit': None, 12 | '--offset': None, 13 | '--filterFile': None, 14 | '--facets-file': None, 15 | '--purviewName': self.PURVIEW_NAME 16 | } 17 | search = _search.Search() 18 | data = search.searchQuery(args) 19 | self.assertGreaterEqual(data['@search.count'],0) 20 | 21 | if __name__ == "__main__": 22 | os.environ.get('PURVIEW_NAME', TestSearch.PURVIEW_NAME) 23 | unittest.main() -------------------------------------------------------------------------------- /purviewcli/cli/relationship.py: -------------------------------------------------------------------------------- 1 | """ 2 | usage: 3 | pv relationship create --payloadFile= 4 | pv relationship delete --guid= 5 | pv relationship put --payloadFile= 6 | pv relationship read --guid= [--extendedInfo] 7 | 8 | options: 9 | --purviewName= [string] Azure Purview account name. 10 | --extendedInfo [boolean] Limits whether includes extended information [default: false]. 11 | --guid= [string] The globally unique identifier of the relationship. 12 | --payloadFile= [string] File path to a valid JSON document. 13 | 14 | """ 15 | from docopt import docopt 16 | 17 | if __name__ == '__main__': 18 | arguments = docopt(__doc__) 19 | -------------------------------------------------------------------------------- /samples/json/scan/search_filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "and": [{ 3 | "not": { 4 | "or": [{ 5 | "attributeName": "size", 6 | "operator": "eq", 7 | "attributeValue": 0 8 | }, { 9 | "attributeName": "fileSize", 10 | "operator": "eq", 11 | "attributeValue": 0 12 | }] 13 | } 14 | }, { 15 | "not": { 16 | "classification": "MICROSOFT.SYSTEM.TEMP_FILE" 17 | } 18 | }, { 19 | "not": { 20 | "or": [{ 21 | "entityType": "AtlasGlossaryTerm" 22 | }, { 23 | "entityType": "AtlasGlossary" 24 | }] 25 | } 26 | }] 27 | } -------------------------------------------------------------------------------- /doc/commands/policystore/deleteDataPolicy.md: -------------------------------------------------------------------------------- 1 | # pv policystore deleteDataPolicy 2 | [Command Reference](../../../README.md#command-reference) > [policystore](./main.md) > deleteDataPolicy 3 | 4 | ## Description 5 | Delete a data policy. 6 | 7 | ## Syntax 8 | ``` 9 | pv policystore deleteDataPolicy --policyName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--policyName` (string) 14 | The name of the data policy. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Delete a data policy. 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/policystore/dataPolicies/{policyName} 23 | ``` 24 | 25 | ## Examples 26 | Delete a data policy. 27 | ```powershell 28 | pv policystore deleteDataPolicy --policyName "new-policy" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/insight/tagsTimeSeries.md: -------------------------------------------------------------------------------- 1 | # pv insight tagsTimeSeries 2 | [Command Reference](../../../README.md#command-reference) > [insight](./main.md) > tagsTimeSeries 3 | 4 | ## Description 5 | Total number of scans by status and time period. 6 | 7 | ## Syntax 8 | ``` 9 | pv insight tagsTimeSeries 10 | ``` 11 | 12 | ## Required Arguments 13 | *None* 14 | 15 | ## Optional Arguments 16 | *None* 17 | 18 | ## API Mapping 19 | ``` 20 | GET https://{accountName}.purview.azure.com/mapanddiscover/reports/serverless/asset2/tags/timeSeries 21 | ``` 22 | 23 | ## Examples 24 | Get the total number of scans by status and time period. 25 | ```powershell 26 | pv insight tagsTimeSeries 27 | ``` 28 |
Sample response. 29 |

30 | 31 | ```json 32 | { 33 | "records": [] 34 | } 35 | ``` 36 |

37 |
38 | -------------------------------------------------------------------------------- /doc/commands/account/deleteResourceSetRule.md: -------------------------------------------------------------------------------- 1 | # pv account deleteResourceSetRule 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > deleteResourceSetRule 3 | 4 | ## Description 5 | Delete a resource set. 6 | 7 | ## Syntax 8 | ``` 9 | pv account deleteResourceSetRule 10 | ``` 11 | 12 | ## Required Arguments 13 | *None* 14 | 15 | ## Optional Arguments 16 | *None* 17 | 18 | ## API Mapping 19 | Account Data Plane > Resource Set Rules > [Delete Resource Set Rule](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/resource-set-rules/delete-resource-set-rule) 20 | ``` 21 | DELETE https://{accountName}.purview.azure.com/account/resourceSetRuleConfigs/defaultResourceSetRuleConfig 22 | ``` 23 | 24 | ## Examples 25 | Delete a resource set. 26 | ```powershell 27 | pv account deleteResourceSetRule 28 | ``` -------------------------------------------------------------------------------- /doc/commands/scan/deleteDataSource.md: -------------------------------------------------------------------------------- 1 | # pv scan deleteDataSource 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > deleteDataSource 3 | 4 | ## Description 5 | Deletes a data source. 6 | 7 | ## Syntax 8 | ``` 9 | pv scan deleteDataSource --dataSourceName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Scanning Data Plane > Data Sources > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/data-sources/delete) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName} 23 | ``` 24 | 25 | ## Examples 26 | Delete a data source. 27 | ```powershell 28 | pv scan deleteDataSource --dataSourceName "AzureSynapseAnalytics-Wke" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/entity/delete.md: -------------------------------------------------------------------------------- 1 | # pv entity delete 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > delete 3 | 4 | ## Description 5 | Delete an entity identified by its GUID. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity delete --guid= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Entity > [Delete By Guid](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-by-guid) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid} 23 | ``` 24 | 25 | ## Examples 26 | Delete an existing entity by its GUID. 27 | ```powershell 28 | pv entity delete --guid "d3a5df04-8067-4558-a4bc-01f6ddc5aef8" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/relationship/put.md: -------------------------------------------------------------------------------- 1 | # pv relationship put 2 | [Command Reference](../../../README.md#command-reference) > [relationship](./main.md) > put 3 | 4 | ## Description 5 | Update an existing relationship between entities. 6 | 7 | ## Syntax 8 | ``` 9 | pv relationship put --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Relationship > [Update](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/relationship/update) 21 | ``` 22 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/relationship 23 | ``` 24 | 25 | ## Examples 26 | Update an existing relationship. 27 | ```powershell 28 | pv relationship put --payloadFile "/path/to/file.json" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/glossary/delete.md: -------------------------------------------------------------------------------- 1 | # pv glossary delete 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > delete 3 | 4 | ## Description 5 | Delete a glossary. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary delete --glossaryGuid= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--glossaryGuid` (string) 14 | The globally unique identifier for glossary. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [Delete Glossary](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/delete-glossary) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/{glossaryGuid} 23 | ``` 24 | 25 | ## Examples 26 | Delete a glossary. 27 | ```powershell 28 | pv glossary delete --glossaryGuid "ac6ddb6d-d53f-4df7-b6d8-a4c29aca1447" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/types/deleteTypeDef.md: -------------------------------------------------------------------------------- 1 | # pv types deleteTypeDef 2 | [Command Reference](../../../README.md#command-reference) > [types](./main.md) > deleteTypeDef 3 | 4 | ## Description 5 | Delete API for type identified by its name. 6 | 7 | ## Syntax 8 | ``` 9 | pv types deleteTypeDef --name= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--name` (string) 14 | The name of the type. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Types > [Delete Type By Name](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/types/delete-type-by-name) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/types/typedef/name/{name} 23 | ``` 24 | 25 | ## Examples 26 | Delete a type definition by name. 27 | ```powershell 28 | pv types deleteTypeDef --name "My Custom Term Template" 29 | ``` -------------------------------------------------------------------------------- /samples/json/search/facets.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "facet": "assetType", 3 | "count": 0, 4 | "sort": { 5 | "count": "desc" 6 | } 7 | }, { 8 | "facet": "classification", 9 | "count": 10, 10 | "sort": { 11 | "count": "desc" 12 | } 13 | }, { 14 | "facet": "contactId", 15 | "count": 10, 16 | "sort": { 17 | "count": "desc" 18 | } 19 | }, { 20 | "facet": "label", 21 | "count": 10, 22 | "sort": { 23 | "count": "desc" 24 | } 25 | }, { 26 | "facet": "term", 27 | "count": 10, 28 | "sort": { 29 | "count": "desc" 30 | } 31 | }, { 32 | "facet": "classificationCategory", 33 | "count": 0, 34 | "sort": { 35 | "count": "desc" 36 | } 37 | }, { 38 | "facet": "fileExtension", 39 | "count": 0, 40 | "sort": { 41 | "count": "desc" 42 | } 43 | }] -------------------------------------------------------------------------------- /doc/commands/scan/deleteScanRuleset.md: -------------------------------------------------------------------------------- 1 | # pv scan deleteScanRuleset 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > deleteScanRuleset 3 | 4 | ## Description 5 | Deletes a scan ruleset 6 | 7 | ## Syntax 8 | ``` 9 | pv scan deleteScanRuleset --scanRulesetName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--scanRulesetName` (string) 14 | The scan ruleset name. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Scanning Data Plane > Scan Rulesets > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scan-rulesets/delete) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/scan/scanrulesets/{scanRulesetName} 23 | ``` 24 | 25 | ## Examples 26 | Delete a custom scan ruleset by name. 27 | ```powershell 28 | pv scan deleteScanRuleset --scanRulesetName "twitter_scan_rule_set" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/share/deleteSentShare.md: -------------------------------------------------------------------------------- 1 | # pv share deleteSentShare 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > deleteSentShare 4 | 5 | ## Description 6 | 7 | Deletes a sent share. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share deleteSentShare --sentShareName= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | ## Optional Arguments 22 | 23 | *None* 24 | 25 | ## API Mapping 26 | 27 | Share Data Plane > Sent Shares > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/sent-shares/delete) 28 | ``` 29 | DELETE https://{accountName}.purview.azure.com/share/sentShares/{sentShareName} 30 | ``` 31 | 32 | ## Examples 33 | 34 | Delete a sent share. 35 | 36 | ```powershell 37 | pv share deleteSentShare --sentShareName "NewShare" 38 | ``` -------------------------------------------------------------------------------- /samples/json/scan/search_facets.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "facet": "assetType", 3 | "count": 0, 4 | "sort": { 5 | "count": "desc" 6 | } 7 | }, { 8 | "facet": "classification", 9 | "count": 10, 10 | "sort": { 11 | "count": "desc" 12 | } 13 | }, { 14 | "facet": "contactId", 15 | "count": 10, 16 | "sort": { 17 | "count": "desc" 18 | } 19 | }, { 20 | "facet": "label", 21 | "count": 10, 22 | "sort": { 23 | "count": "desc" 24 | } 25 | }, { 26 | "facet": "term", 27 | "count": 10, 28 | "sort": { 29 | "count": "desc" 30 | } 31 | }, { 32 | "facet": "classificationCategory", 33 | "count": 0, 34 | "sort": { 35 | "count": "desc" 36 | } 37 | }, { 38 | "facet": "fileExtension", 39 | "count": 0, 40 | "sort": { 41 | "count": "desc" 42 | } 43 | }] -------------------------------------------------------------------------------- /doc/commands/glossary/deleteTerm.md: -------------------------------------------------------------------------------- 1 | # pv glossary deleteTerm 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > deleteTerm 3 | 4 | ## Description 5 | Delete a glossary term. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary deleteTerm --termGuid= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--termGuid` (string) 14 | The globally unique identifier for glossary term. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [Delete Glossary Term](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/delete-glossary-term) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/term/{termGuid} 23 | ``` 24 | 25 | ## Examples 26 | Delete a term. 27 | ```powershell 28 | pv glossary deleteTerm --termGuid "fb035cf8-aeb2-44b1-9fdf-d532dd26a5f0" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/scan/deleteKeyVault.md: -------------------------------------------------------------------------------- 1 | # pv scan deleteKeyVault 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > deleteKeyVault 3 | 4 | ## Description 5 | Deletes the key vault connection associated with the account 6 | 7 | ## Syntax 8 | ``` 9 | pv scan deleteKeyVault --keyVaultName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--keyVaultName` (string) 14 | The data source name. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Scanning Data Plane > Key Vault Connections > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/key-vault-connections/delete) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/scan/azureKeyVaults/{keyVaultName} 23 | ``` 24 | 25 | ## Examples 26 | Delete a key vault connection by name. 27 | ```powershell 28 | pv scan deleteKeyVault --keyVaultName "MyKeyVault" 29 | ``` -------------------------------------------------------------------------------- /samples/json/relationship/update.json: -------------------------------------------------------------------------------- 1 | { 2 | "end1": { 3 | "guid": "9eb55cd7-911b-43b6-8fc6-bdf57c3e7d2a", 4 | "typeName": "adf_copy_activity", 5 | "uniqueAttributes": { 6 | "qualifiedName": "/subscriptions/2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0/resourceGroups/purviewlab/providers/Microsoft.DataFactory/factories/adf8951/pipelines/copyPipeline/activities/copyActivity" 7 | } 8 | }, 9 | "end2": { 10 | "guid": "f0a9c131-8cad-4fa9-928d-f4f6f6f60000", 11 | "typeName": "azure_sql_table", 12 | "uniqueAttributes": { 13 | "qualifiedName": "mssql://sqlsvr8951.database.windows.net/sqldb8951/SalesLT/SalesOrderDetail" 14 | } 15 | }, 16 | "guid": "adaa22fe-e391-436a-a4c6-dfa3041fcb71", 17 | "label": "__Process.outputs", 18 | "status": "ACTIVE", 19 | "typeName": "process_dataset_outputs" 20 | } -------------------------------------------------------------------------------- /doc/commands/share/registerEmail.md: -------------------------------------------------------------------------------- 1 | # pv share registerEmail 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > registerEmail 4 | 5 | ## Description 6 | 7 | Registers the tenant and email combination for activation. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share registerEmail 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--payloadFile` (string) 18 | 19 | File path to a valid JSON document. 20 | 21 | ## Optional Arguments 22 | 23 | *None* 24 | 25 | ## API Mapping 26 | 27 | Share Data Plane > Email Registration > [Register](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/email-registration/register) 28 | ``` 29 | POST https://{accountName}.purview.azure.com/share/registerEmail 30 | ``` 31 | 32 | ## Examples 33 | 34 | Registers the tenant and email combination for activation. 35 | 36 | ```powershell 37 | pv share registerEmail 38 | ``` -------------------------------------------------------------------------------- /samples/json/search/filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "and": [{ 3 | "or": [{ 4 | "assetType": "Azure SQL Database" 5 | }, { 6 | "assetType": "Azure SQL Server" 7 | }] 8 | }, { 9 | "not": { 10 | "or": [{ 11 | "attributeName": "size", 12 | "operator": "eq", 13 | "attributeValue": 0 14 | }, { 15 | "attributeName": "fileSize", 16 | "operator": "eq", 17 | "attributeValue": 0 18 | }] 19 | } 20 | }, { 21 | "not": { 22 | "classification": "MICROSOFT.SYSTEM.TEMP_FILE" 23 | } 24 | }, { 25 | "not": { 26 | "or": [{ 27 | "entityType": "AtlasGlossaryTerm" 28 | }, { 29 | "entityType": "AtlasGlossary" 30 | }] 31 | } 32 | }] 33 | } -------------------------------------------------------------------------------- /doc/commands/account/deleteCollection.md: -------------------------------------------------------------------------------- 1 | # pv account deleteCollection 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > deleteCollection 3 | 4 | ## Description 5 | Deletes a collection. 6 | 7 | ## Syntax 8 | ``` 9 | pv account deleteCollection --collectionName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--collectionName` (string) 14 | This is the unique name of the collection (not the friendly name). 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Account Data Plane > Collections > [Delete Collection](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/collections/delete-collection) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/account/collections/{collectionName} 23 | ``` 24 | 25 | ## Examples 26 | Delete a collection by name. 27 | ```powershell 28 | pv account deleteCollection --collectionName "tn56xt" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/relationship/delete.md: -------------------------------------------------------------------------------- 1 | # pv relationship delete 2 | [Command Reference](../../../README.md#command-reference) > [relationship](./main.md) > delete 3 | 4 | ## Description 5 | Delete a relationship between entities by its GUID. 6 | 7 | ## Syntax 8 | ``` 9 | pv relationship delete --guid= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the relationship. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Relationship > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/relationship/delete) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/relationship/guid/{guid} 23 | ``` 24 | 25 | ## Examples 26 | Delete a relationship between entities by relationship GUID. 27 | ```powershell 28 | pv relationship delete --guid "90ca81c2-2d68-43f6-90cc-198a0fd07548" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/share/deleteReceivedShare.md: -------------------------------------------------------------------------------- 1 | # pv share deleteReceivedShare 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > deleteReceivedShare 4 | 5 | ## Description 6 | 7 | Deletes a received share. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share deleteReceivedShare --receivedShareName= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--receivedShareName` (string) 18 | The name of the received share. 19 | 20 | ## Optional Arguments 21 | 22 | *None* 23 | 24 | ## API Mapping 25 | 26 | Share Data Plane > Received Shares > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/received-shares/delete) 27 | ``` 28 | DELETE https://{accountName}.purview.azure.com/share/receivedShares/{receivedShareName} 29 | ``` 30 | 31 | ## Examples 32 | 33 | Delete a received share. 34 | 35 | ```powershell 36 | pv share deleteReceivedShare --receivedShareName "NewShare" 37 | ``` -------------------------------------------------------------------------------- /samples/json/graphql/graphql04.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "startTime": "2021-07-03T00:00:00.000Z", 4 | "endTime": "2021-07-31T11:46:12.413Z" 5 | }, 6 | "query": "query ($startTime: DateTime!, $endTime: DateTime!) {\n classificationQuery {\n files: classifications(sortBy: {fieldsToSort: {fieldName: FILESCOUNT, sortDirection: DESC}}, paginationOptions: {offset: 0, limit: 5}, timeRequestOptions: {startTime: $startTime, endTime: $endTime}) {\n totalCount\n values {\n name\n filesCount\n __typename\n }\n __typename\n }\n tables: classifications(sortBy: {fieldsToSort: {fieldName: TABLESCOUNT, sortDirection: DESC}}, paginationOptions: {offset: 0, limit: 5}, timeRequestOptions: {startTime: $startTime, endTime: $endTime}) {\n totalCount\n values {\n name\n tablesCount\n __typename\n }\n __typename\n }\n __typename\n }\n}\n" 7 | } -------------------------------------------------------------------------------- /doc/commands/glossary/deleteCategory.md: -------------------------------------------------------------------------------- 1 | # pv glossary deleteCategory 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > deleteCategory 3 | 4 | ## Description 5 | Delete a glossary category. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary deleteCategory --categoryGuid= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--categoryGuid` (string) 14 | The globally unique identifier of the category. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [Delete Glossary Category](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/delete-glossary-category) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/category/{categoryGuid} 23 | ``` 24 | 25 | ## Examples 26 | Delete a category. 27 | ```powershell 28 | pv glossary deleteCategory --categoryGuid "bba73040-db31-4025-8e03-a8eb27fc0822" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/glossary/readCategoryRelated.md: -------------------------------------------------------------------------------- 1 | # pv glossary readCategoryRelated 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > readCategoryRelated 3 | 4 | ## Description 5 | Get all related categories (parent and children). 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary readCategoryRelated --categoryGuid= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--categoryGuid` (string) 14 | The globally unique identifier of the category. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [List Related Categories](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/list-related-categories) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/category/{categoryGuid}/related 23 | ``` 24 | 25 | ## Examples 26 | ```powershell 27 | pv glossary readCategoryRelated --categoryGuid "c856ecef-21e6-4e92-8607-9493d8432e78" 28 | ``` -------------------------------------------------------------------------------- /doc/commands/scan/deleteScan.md: -------------------------------------------------------------------------------- 1 | # pv scan deleteScan 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > deleteScan 3 | 4 | ## Description 5 | Deletes the scan associated with the data source 6 | 7 | ## Syntax 8 | ``` 9 | pv scan deleteScan --dataSourceName= --scanName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Scanning Data Plane > Scans > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scans/delete) 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName} 26 | ``` 27 | 28 | ## Examples 29 | Delete a scan by data source name and scan name. 30 | ```powershell 31 | pv scan deleteScan --dataSourceName "AzureSqlDatabase-9ZX" --scanName "Scan-ttF" 32 | ``` -------------------------------------------------------------------------------- /doc/commands/scan/deleteClassificationRule.md: -------------------------------------------------------------------------------- 1 | # pv scan deleteClassificationRule 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > deleteClassificationRule 3 | 4 | ## Description 5 | Deletes a classification rule 6 | 7 | ## Syntax 8 | ``` 9 | pv scan deleteClassificationRule --classificationRuleName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--classificationRuleName` (string) 14 | The name of the classification rule. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Scanning Data Plane > Classification Rules > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/classification-rules/delete) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/scan/classificationrules/{classificationRuleName} 23 | ``` 24 | 25 | ## Examples 26 | Delete a classification rule by name. 27 | ```powershell 28 | pv scan deleteClassificationRule --classificationRuleName "twitter_handle" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/account/putResourceSetRule.md: -------------------------------------------------------------------------------- 1 | # pv account putResourceSetRule 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > putResourceSetRule 3 | 4 | ## Description 5 | Creates or updates a resource set. 6 | 7 | ## Syntax 8 | ``` 9 | pv account putResourceSetRule --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Account Data Plane > Resource Set Rules > [Create Or Update Resource Set Rule](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/resource-set-rules/create-or-update-resource-set-rule) 21 | ``` 22 | PUT https://{accountName}.purview.azure.com/account/resourceSetRuleConfigs/defaultResourceSetRuleConfig 23 | ``` 24 | 25 | ## Examples 26 | Create or update a resource set. 27 | ```powershell 28 | pv account putResourceSetRule --payloadFile "/path/to/file.json" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/share/deleteAsset.md: -------------------------------------------------------------------------------- 1 | # pv share deleteAsset 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > deleteAsset 4 | 5 | ## Description 6 | 7 | Delete asset in a sentShare. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share deleteAsset --sentShareName= --assetName= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | The name of the sent share. 19 | 20 | `--assetName` (string) 21 | The name of the asset. 22 | 23 | ## Optional Arguments 24 | 25 | *None* 26 | 27 | ## API Mapping 28 | 29 | Share Data Plane > Assets > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/assets/delete) 30 | ``` 31 | DELETE https://{accountName}.purview.azure.com/share/sentShares/{sentShareName}/assets/{assetName} 32 | ``` 33 | 34 | ## Examples 35 | 36 | Delete asset from a sent share. 37 | 38 | ```powershell 39 | pv share deleteAsset --sentShareName "MyNewSentShare" --assetName "MyAssetName" 40 | ``` -------------------------------------------------------------------------------- /doc/commands/policystore/deleteDataPolicyScope.md: -------------------------------------------------------------------------------- 1 | # pv policystore deleteDataPolicyScope 2 | [Command Reference](../../../README.md#command-reference) > [policystore](./main.md) > deleteDataPolicyScope 3 | 4 | ## Description 5 | Delete a data policy scope. 6 | 7 | ## Syntax 8 | ``` 9 | pv policystore deleteDataPolicyScope --policyName= --datasource= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--policyName` (string) 14 | The name of the data policy. 15 | 16 | `--datasource` (string) 17 | The name of the data source. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Delete a scope associated to an existing data policy. 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/policystore/dataPolicies/{policyName}/scopes/{datasource} 26 | ``` 27 | 28 | ## Examples 29 | Delete a scope associated to an existing data policy. 30 | ```powershell 31 | pv policystore deleteDataPolicyScope --policyName "new-policy" --scopeName "AzureDataLakeStorage" 32 | ``` -------------------------------------------------------------------------------- /doc/commands/insight/main.md: -------------------------------------------------------------------------------- 1 | # Insight 2 | [Command Reference](../../../README.md#command-reference) > insight 3 | 4 | ## Asset 5 | | Command | Description | 6 | | --- | --- | 7 | | [pv insight assetDistribution](./assetDistribution.md) | Asset distribution by sourceType, classificationCategory, and classification. | 8 | | [pv insight filesAggregation](./filesAggregation.md) | File count and size by fileType and sourceType. | 9 | | [pv insight filesWithoutResourceSet](./filesWithoutResourceSet.md) | Number of files not stored in a resource set by sourceType. | 10 | | [pv insight tags](./tags.md) | Number of assets by tags. | 11 | | [pv insight tagsTimeSeries](./tagsTimeSeries.md) | Number of assets by tags and time period| 12 | 13 | ## Scan 14 | | Command | Description | 15 | | --- | --- | 16 | | [pv insight scanStatusSummary](./scanStatusSummary.md) | Total number of scans by status. | 17 | | [pv insight scanStatusSummaryByTs](./scanStatusSummaryByTs.md) | Total number of scans by status and time period. | -------------------------------------------------------------------------------- /doc/commands/glossary/create.md: -------------------------------------------------------------------------------- 1 | # pv glossary create 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > create 3 | 4 | ## Description 5 | Create a glossary. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary create --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [Create Glossary](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/create-glossary) 21 | ``` 22 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary 23 | ``` 24 | 25 | ## Examples 26 | Create a glossary. 27 | ```powershell 28 | pv glossary create --payloadFile "/path/to/file.json" 29 | ``` 30 |
Example payload. 31 |

32 | 33 | ```json 34 | { 35 | "name": "MyGlossary", 36 | "qualifiedName": "MyGlossary" 37 | } 38 | ``` 39 |

40 |
-------------------------------------------------------------------------------- /doc/commands/entity/deleteBulk.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteBulk 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteBulk 3 | 4 | ## Description 5 | Delete a list of entities in bulk identified by their GUIDs or unique attributes. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteBulk --guid=... 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Entity > [Delete By Guids](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-by-guids) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/bulk 23 | ``` 24 | 25 | ## Examples 26 | Delete a list of existing entities by their GUID. 27 | ```powershell 28 | pv entity deleteBulk --guid "0d42ecc0-0fb4-4276-96b0-0561cae3e97d" --guid "31aae3f9-6d6e-4417-97f4-08d89e360d49" --guid "5b7b5ae2-e2af-46b5-8998-926e7b4ba3f9" 29 | ``` -------------------------------------------------------------------------------- /doc/commands/scan/deleteTrigger.md: -------------------------------------------------------------------------------- 1 | # pv scan deleteTrigger 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > deleteTrigger 3 | 4 | ## Description 5 | Deletes the trigger associated with the scan 6 | 7 | ## Syntax 8 | ``` 9 | pv scan deleteTrigger --dataSourceName= --scanName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Scanning Data Plane > Triggers > [Delete Trigger](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/triggers/delete-trigger) 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName}/triggers/default 26 | ``` 27 | 28 | ## Examples 29 | Delete a scan trigger by data source name and scan name. 30 | ```powershell 31 | pv scan deleteTrigger --dataSourceName "AzureDataLakeStorage-EqK" --scanName "Scan-xTh" 32 | ``` -------------------------------------------------------------------------------- /purviewcli/cli/lineage.py: -------------------------------------------------------------------------------- 1 | """ 2 | usage: 3 | pv lineage read --guid= [--depth= --width= --direction=] 4 | pv lineage readNext --guid= [--direction --offset= --limit=] 5 | 6 | options: 7 | --purviewName= [string] Azure Purview account name. 8 | --depth= [integer] The number of hops for lineage [default: 3]. 9 | --direction= [string] The direction of the lineage, which could be INPUT, OUTPUT or BOTH [default: BOTH]. 10 | --guid= [string] The globally unique identifier of the entity. 11 | --limit= [integer] The page size - by default there is no paging [default: -1]. 12 | --offset= [integer] Offset for pagination purpose [default: 0]. 13 | --width= [integer] The number of max expanding width in lineage [default: 6]. 14 | 15 | """ 16 | from docopt import docopt 17 | 18 | if __name__ == '__main__': 19 | arguments = docopt(__doc__) 20 | -------------------------------------------------------------------------------- /doc/commands/insight/scanStatusSummary.md: -------------------------------------------------------------------------------- 1 | # pv insight scanStatusSummary 2 | [Command Reference](../../../README.md#command-reference) > [insight](./main.md) > scanStatusSummary 3 | 4 | ## Description 5 | Total number of scans by status. 6 | 7 | ## Syntax 8 | ``` 9 | pv insight scanStatusSummary [--numberOfDays=] 10 | ``` 11 | 12 | ## Required Arguments 13 | *None* 14 | 15 | ## Optional Arguments 16 | `--numberOfDays` (integer) 17 | Trailing time period in days [default: 30]. 18 | 19 | ## API Mapping 20 | ``` 21 | GET https://{accountName}.purview.azure.com/mapanddiscover/reports/scanstatus2/summaries 22 | ``` 23 | 24 | ## Examples 25 | Get the total number of scans by status. 26 | ```powershell 27 | pv insight scanStatusSummary 28 | ``` 29 |
Sample response. 30 |

31 | 32 | ```json 33 | { 34 | "values": [ 35 | { 36 | "count": 33, 37 | "type": "Succeeded" 38 | }, 39 | { 40 | "count": 9, 41 | "type": "Failed" 42 | } 43 | ] 44 | } 45 | ``` 46 |

47 |
48 | -------------------------------------------------------------------------------- /purviewcli/client/_relationship.py: -------------------------------------------------------------------------------- 1 | from .endpoint import Endpoint, decorator, get_json 2 | 3 | class Relationship(Endpoint): 4 | def __init__(self): 5 | Endpoint.__init__(self) 6 | self.app = 'catalog' 7 | 8 | @decorator 9 | def relationshipCreate(self, args): 10 | self.method = 'POST' 11 | self.endpoint = '/api/atlas/v2/relationship' 12 | self.payload = get_json(args, '--payloadFile') 13 | 14 | @decorator 15 | def relationshipPut(self, args): 16 | self.method = 'PUT' 17 | self.endpoint = '/api/atlas/v2/relationship' 18 | self.payload = get_json(args, '--payloadFile') 19 | 20 | @decorator 21 | def relationshipDelete(self, args): 22 | self.method = 'DELETE' 23 | self.endpoint = f'/api/atlas/v2/relationship/guid/{args["--guid"]}' 24 | 25 | @decorator 26 | def relationshipRead(self, args): 27 | self.method = 'GET' 28 | self.endpoint = f'/api/atlas/v2/relationship/guid/{args["--guid"]}' 29 | self.params = {'extendedInfo': str(args["--extendedInfo"]).lower()} 30 | -------------------------------------------------------------------------------- /doc/commands/scan/cancelScan.md: -------------------------------------------------------------------------------- 1 | # pv scan cancelScan 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > cancelScan 3 | 4 | ## Description 5 | Cancels a scan 6 | 7 | ## Syntax 8 | ``` 9 | pv scan cancelScan --dataSourceName= --scanName= --runId= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | `--runId` (string) 20 | The unique ID of the scan run. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Scanning Data Plane > Scan Result > [Cancel Scan](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scan-result/cancel-scan) 27 | ``` 28 | POST https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel 29 | ``` 30 | 31 | ## Examples 32 | Cancel a scan run by data source name, scan name, and run id. 33 | ```powershell 34 | pv scan cancelScan --dataSourceName "AzureDataLakeStorage-EqK" --scanName "Scan-p1E" --runId "4b6ee19a-33f8-4b97-92bf-71cce074ba30" 35 | ``` -------------------------------------------------------------------------------- /doc/commands/management/deleteAccount.md: -------------------------------------------------------------------------------- 1 | # pv management deleteAccount 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > deleteAccount 3 | 4 | ## Description 5 | Deletes the account resource. 6 | 7 | ## Syntax 8 | ``` 9 | pv management deleteAccount --subscriptionId= --resourceGroupName= --accountName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Accounts > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/accounts/delete) 27 | ``` 28 | DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName} 29 | ``` 30 | 31 | ## Examples 32 | ```powershell 33 | pv management deleteAccount --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "esg" --accountName "esg-26fa7f24-pv" 34 | ``` -------------------------------------------------------------------------------- /doc/commands/share/deleteAssetMapping.md: -------------------------------------------------------------------------------- 1 | # pv share deleteAssetMapping 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > deleteAssetMapping 4 | 5 | ## Description 6 | 7 | Delete AssetMapping in a receivedShare. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share deleteAssetMapping --receivedShareName= --assetMappingName= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--receivedShareName` (string) 18 | The name of the received share. 19 | 20 | `--assetMappingName` (string) 21 | The name of the asset mapping. 22 | 23 | ## Optional Arguments 24 | 25 | *None* 26 | 27 | ## API Mapping 28 | 29 | Share Data Plane > Asset Mappings > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/asset-mappings/delete) 30 | ``` 31 | DELETE https://{accountName}.purview.azure.com/share/receivedShares/{receivedShareName}/assetMappings/{assetMappingName} 32 | ``` 33 | 34 | ## Examples 35 | 36 | Delete an asset mapping for a particular received share. 37 | 38 | ```powershell 39 | pv share deleteAssetMapping --receivedShareName "NewShare" --assetMappingName "assetName" 40 | ``` -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Taygan Rifat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /doc/commands/glossary/createCategory.md: -------------------------------------------------------------------------------- 1 | # pv glossary createCategory 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > createCategory 3 | 4 | ## Description 5 | Create a glossary category. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary createCategory --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [Create Glossary Category](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/create-glossary-category) 21 | ``` 22 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/category 23 | ``` 24 | 25 | ## Examples 26 | Create a new category. 27 | ```powershell 28 | pv glossary createCategory --payloadFile "/path/to/file.json" 29 | ``` 30 |
Example payload. 31 |

32 | 33 | ```json 34 | { 35 | "anchor": { 36 | "glossaryGuid": "f2307f48-5834-4709-be85-02f3aea5d149" 37 | }, 38 | "name": "MyCategory" 39 | } 40 | ``` 41 |

42 |
-------------------------------------------------------------------------------- /doc/commands/share/deleteSentInvitation.md: -------------------------------------------------------------------------------- 1 | # pv share deleteSentInvitation 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > deleteSentInvitation 4 | 5 | ## Description 6 | 7 | Delete Invitation in a share. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share deleteSentInvitation --sentShareName= --invitationName= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | `--invitationName` (string) 22 | 23 | Name of the invitation. 24 | 25 | ## Optional Arguments 26 | 27 | *None* 28 | 29 | ## API Mapping 30 | 31 | Share Data Plane > Sent Share Invitations > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/sent-share-invitations/delete) 32 | ``` 33 | DELETE https://{accountName}.purview.azure.com/share/sentShares/{sentShareName}/sentShareInvitations/{sentShareInvitationName} 34 | ``` 35 | 36 | ## Examples 37 | 38 | Delete a sent invitation for a sent share. 39 | 40 | ```powershell 41 | pv share deleteSentInvitation --sentShareName "NewShare" --invitationName "7543515465d5676285972198ef4cdc1dd3a0f711" 42 | ``` -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | from os import path 3 | from purviewcli import __version__ 4 | 5 | # Read the contents of README.md 6 | this_directory = path.abspath(path.dirname(__file__)) 7 | with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: 8 | long_description = f.read() 9 | 10 | setuptools.setup( 11 | name='purviewcli', 12 | version=__version__, 13 | description="This package provides a command line interface to Azure Purview's REST API.", 14 | long_description=long_description, 15 | long_description_content_type='text/markdown', 16 | url='https://github.com/tayganr/purviewcli', 17 | author='Taygan Rifat', 18 | author_email='contact@taygan.co', 19 | license='MIT', 20 | packages=setuptools.find_packages(), 21 | install_requires = ['docopt','requests','azure-identity'], 22 | classifiers=[ 23 | "Programming Language :: Python :: 3", 24 | "License :: OSI Approved :: MIT License", 25 | "Operating System :: OS Independent", 26 | ], 27 | entry_points={ 28 | 'console_scripts': [ 29 | 'pv = purviewcli.cli.cli:main' 30 | ], 31 | } 32 | ) -------------------------------------------------------------------------------- /doc/commands/entity/addLabels.md: -------------------------------------------------------------------------------- 1 | # pv entity addLabels 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > addLabels 3 | 4 | ## Description 5 | Append labels to an entity. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity addLabels --guid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Add given labels to a given entity.](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-label) 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/labels 26 | ``` 27 | 28 | ## Examples 29 | Append labels to an existing entity. 30 | ```powershell 31 | pv entity addLabels --guid "7738b5c7-7977-4261-9871-7d00e11cabe8" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | [ 38 | "a", 39 | "b", 40 | "c" 41 | ] 42 | ``` 43 |

44 |
-------------------------------------------------------------------------------- /doc/commands/entity/getBusinessMetadataTemplate.md: -------------------------------------------------------------------------------- 1 | # pv entity getBusinessMetadataTemplate 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > getBusinessMetadataTemplate 3 | 4 | ## Description 5 | Get a sample template for uploading/creating business metadata in bulk. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity getBusinessMetadataTemplate 10 | ``` 11 | 12 | ## Required Arguments 13 | *None* 14 | 15 | ## Optional Arguments 16 | *None* 17 | 18 | ## API Mapping 19 | Catalog Data Plane > Entity > [Get Sample Business Metadata Template](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/get-sample-business-metadata-template) 20 | ``` 21 | GET https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/businessmetadata/import/template 22 | ``` 23 | 24 | ## Examples 25 | Download a sample template for uploading/creating business metadata in bulk. 26 | ```powershell 27 | pv entity getBusinessMetadataTemplate 28 | ``` 29 |
Sample response. 30 |

31 | 32 | ```json 33 | { 34 | "export": "/YOUR_CURRENT_DIRECTORY/export.csv", 35 | "status_code": 200 36 | } 37 | ``` 38 |

39 |
-------------------------------------------------------------------------------- /samples/json/glossary/terms.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anchor": { 4 | "glossaryGuid": "b5544147-c1c5-401c-b835-d3e93e7eaae2" 5 | }, 6 | "longDescription": "This is a long definition.", 7 | "name": "Custom01", 8 | "qualifiedName": "Custom01@Glossary", 9 | "shortDescription": null, 10 | "status": "Approved", 11 | "templateName": [] 12 | }, 13 | { 14 | "anchor": { 15 | "glossaryGuid": "b5544147-c1c5-401c-b835-d3e93e7eaae2" 16 | }, 17 | "longDescription": "This is a long definition.", 18 | "name": "Custom02", 19 | "qualifiedName": "Custom02@Glossary", 20 | "shortDescription": null, 21 | "status": "Approved", 22 | "templateName": [] 23 | }, 24 | { 25 | "anchor": { 26 | "glossaryGuid": "b5544147-c1c5-401c-b835-d3e93e7eaae2" 27 | }, 28 | "longDescription": "This is a long definition.", 29 | "name": "Custom03", 30 | "qualifiedName": "Custom03@Glossary", 31 | "shortDescription": null, 32 | "status": "Approved", 33 | "templateName": [] 34 | } 35 | ] 36 | -------------------------------------------------------------------------------- /doc/commands/entity/setLabels.md: -------------------------------------------------------------------------------- 1 | # pv entity setLabels 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > setLabels 3 | 4 | ## Description 5 | Overwrite labels for an entity. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity setLabels --guid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Set labels to a given entity.](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/set-labels) 24 | ``` 25 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/labels 26 | ``` 27 | 28 | ## Examples 29 | Overwrite labels property for an existing entity. 30 | ```powershell 31 | pv entity setLabels --guid "7738b5c7-7977-4261-9871-7d00e11cabe8" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | [ 38 | "a", 39 | "b", 40 | "c" 41 | ] 42 | ``` 43 |

44 |
-------------------------------------------------------------------------------- /doc/commands/management/defaultAccount.md: -------------------------------------------------------------------------------- 1 | # pv management defaultAccount 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > defaultAccount 3 | 4 | ## Description 5 | Gets the default account information set for the scope. 6 | 7 | ## Syntax 8 | ``` 9 | pv management defaultAccount --scopeTenantId= --scopeType= --scope= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--scopeTenantId` (string) 14 | The tenant ID. 15 | 16 | `--scopeType` (string) 17 | The scope for the default account (Subscription OR Tenant). 18 | 19 | `--scope` (string) 20 | The Id of the scope object, for example if the scope is "Subscription" then it is the ID of that subscription. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Default Accounts > [Get](https://docs.microsoft.com/en-us/rest/api/purview/default-accounts/get) 27 | ``` 28 | GET https://management.azure.com/providers/Microsoft.Purview/getDefaultAccount 29 | ``` 30 | 31 | ## Examples 32 | ```powershell 33 | pv management defaultAccount --scopeTenantId "72f988bf-86f1-41af-91ab-2d7cd011db47" --scopeType "Subscription" --scope "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 34 | ``` -------------------------------------------------------------------------------- /doc/commands/entity/deleteLabels.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteLabels 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteLabels 3 | 4 | ## Description 5 | Delete label(s) from an entity. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteLabels --guid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Delete given labels to a given entity.](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-labels) 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/labels 26 | ``` 27 | 28 | ## Examples 29 | Delete labels from an existing entity. 30 | ```powershell 31 | pv entity deleteLabels --guid "7738b5c7-7977-4261-9871-7d00e11cabe8" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | [ 38 | "a", 39 | "c" 40 | ] 41 | ``` 42 |

43 |
-------------------------------------------------------------------------------- /purviewcli/cli/search.py: -------------------------------------------------------------------------------- 1 | """ 2 | usage: 3 | pv search autoComplete [--keywords= --limit= --filterFile=] 4 | pv search browse (--entityType= | --path=) [--limit= --offset=] 5 | pv search query [--keywords= --limit= --offset= --filterFile= --facets-file=] 6 | pv search suggest [--keywords= --limit= --filterFile=] 7 | 8 | options: 9 | --purviewName= [string] Azure Purview account name. 10 | --keywords= [string] The keywords applied to all searchable fields. 11 | --entityType= [string] The entity type to browse as the root level entry point. 12 | --path= [string] The path to browse the next level child entities. 13 | --limit= [integer] By default there is no paging [default: 25]. 14 | --offset= [integer] Offset for pagination purpose [default: 0]. 15 | --filterFile= [string] File path to a filter json file. 16 | --facets-file= [string] File path to a facets json file. 17 | 18 | """ 19 | from docopt import docopt 20 | 21 | if __name__ == '__main__': 22 | arguments = docopt(__doc__) 23 | -------------------------------------------------------------------------------- /doc/commands/entity/deleteClassification.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteClassification 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteClassification 3 | 4 | ## Description 5 | Delete a given classification from an existing entity represented by a GUID. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteClassification --guid= --classificationName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--classificationName` (string) 17 | The name of the classification. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Delete Classification](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-classification) 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/classification/{classificationName} 26 | ``` 27 | 28 | ## Examples 29 | Remove a classification from an entity via the entity GUID. 30 | ```powershell 31 | pv entity deleteClassification --guid "bbb9ff1d-f880-435e-ac87-d6fd5676d8f0" --classificationName "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER" 32 | ``` -------------------------------------------------------------------------------- /purviewcli/cli/policystore.py: -------------------------------------------------------------------------------- 1 | """ 2 | usage: 3 | pv policystore deleteDataPolicy --policyName= 4 | pv policystore deleteDataPolicyScope --policyName= --datasource= 5 | pv policystore putDataPolicy --policyName= --payloadFile= 6 | pv policystore putDataPolicyScope --policyName= --payloadFile= 7 | pv policystore putMetadataPolicy --policyId= --payloadFile= 8 | pv policystore readDataPolicies [--policyName=] 9 | pv policystore readDataPolicyScopes --policyName= 10 | pv policystore readMetadataPolicies 11 | pv policystore readMetadataPolicy (--collectionName= | --policyId=) 12 | pv policystore readMetadataRoles 13 | 14 | options: 15 | --purviewName= [string] Azure Purview account name. 16 | --collectionName= [string] The technical name of the Collection (e.g. friendlyName: Sales; name: afwbxs). 17 | --policyId= [string] The unique policy id. 18 | --payloadFile= [string] File path to a valid JSON document. 19 | 20 | """ 21 | from docopt import docopt 22 | 23 | if __name__ == '__main__': 24 | arguments = docopt(__doc__) 25 | -------------------------------------------------------------------------------- /doc/commands/management/removeDefaultAccount.md: -------------------------------------------------------------------------------- 1 | # pv management removeDefaultAccount 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > removeDefaultAccount 3 | 4 | ## Description 5 | Removes the default account from the scope. 6 | 7 | ## Syntax 8 | ``` 9 | pv management removeDefaultAccount --scopeTenantId= --scopeType= --scope= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--scopeTenantId` (string) 14 | The tenant ID. 15 | 16 | `--scopeType` (string) 17 | The scope for the default account (Subscription OR Tenant). 18 | 19 | `--scope` (string) 20 | The Id of the scope object, for example if the scope is "Subscription" then it is the ID of that subscription. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Default Accounts > [Remove](https://docs.microsoft.com/en-us/rest/api/purview/default-accounts/remove) 27 | ``` 28 | POST https://management.azure.com/providers/Microsoft.Purview/removeDefaultAccount 29 | ``` 30 | 31 | ## Examples 32 | ```powershell 33 | pv management removeDefaultAccount --scopeTenantId "72f988bf-86f1-41af-91ab-2d7cd011db47" --scopeType "Subscription" --scope "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 34 | ``` -------------------------------------------------------------------------------- /samples/json/sources/sources.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "kind": "Collection", 4 | "name": "Contoso" 5 | }, 6 | { 7 | "properties": { 8 | "parentCollection": { 9 | "type": "DataSourceReference", 10 | "referenceName": "Contoso" 11 | } 12 | }, 13 | "kind": "Collection", 14 | "name": "Contoso-Sales" 15 | }, 16 | { 17 | "properties": { 18 | "dedicatedSqlEndpoint": "cnt01-prd-synapse001.sql.azuresynapse.net", 19 | "serverlessSqlEndpoint": "cnt01-prd-synapse001-ondemand.sql.azuresynapse.net", 20 | "resourceGroup": "cnt01-prd-di001", 21 | "subscriptionId": "12345678-9abc-def0-0123-456789abcdef", 22 | "location": "eastus", 23 | "resourceName": "cnt01-prd-synapse001", 24 | "parentCollection": { 25 | "type": "DataSourceReference", 26 | "referenceName": "Contoso-Sales" 27 | }, 28 | "collection": null 29 | }, 30 | "kind": "AzureSynapseWorkspace", 31 | "id": "datasources/AzureSynapseWorkspace", 32 | "name": "AzureSynapseWorkspace" 33 | } 34 | ] -------------------------------------------------------------------------------- /doc/commands/share/activateEmail.md: -------------------------------------------------------------------------------- 1 | # pv share activateEmail 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > activateEmail 4 | 5 | ## Description 6 | 7 | Activates the tenant and email combination using the activation code received. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share activateEmail --payloadFile= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--payloadFile` (string) 18 | 19 | File path to a valid JSON document. 20 | 21 | ## Optional Arguments 22 | 23 | *None* 24 | 25 | ## API Mapping 26 | 27 | Share Data Plane > Email Registration > [Activate](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/email-registration/activate) 28 | 29 | ``` 30 | POST https://{accountName}.purview.azure.com/share/activateEmail 31 | ``` 32 | 33 | ## Examples 34 | 35 | Activates the tenant and email combination using the activation code received. 36 | 37 | ```powershell 38 | pv share activateEmail --payloadFile "/path/to/file.json" 39 | ``` 40 | 41 | 42 |
Sample response. 43 |

44 | 45 | ```json 46 | { 47 | "properties":{ 48 | "activationCode":"15ee7153fe0df5a3a449a897d6cec836" 49 | } 50 | } 51 | ``` 52 |

53 |
54 | -------------------------------------------------------------------------------- /doc/commands/policystore/main.md: -------------------------------------------------------------------------------- 1 | # Policystore 2 | [Command Reference](../../../README.md#command-reference) > policystore 3 | 4 | ## Metadata Policies 5 | | Command | Description | 6 | | --- | --- | 7 | | [pv policystore putMetadataPolicy](./putMetadataPolicy.md) | Updates a metadata policy. | 8 | | [pv policystore readMetadataPolicies](./readMetadataPolicies.md) | List or Get metadata policies. | 9 | | [pv policystore readMetadataPolicy](./readMetadataPolicy.md) | Gets a metadata policy. | 10 | | [pv policystore readMetadataRoles](./readMetadataRoles.md) | Lists roles for Purview Account. | 11 | 12 | ## Data Policies 13 | | Command | Description | 14 | | --- | --- | 15 | |[pv policystore deleteDataPolicy](./deleteDataPolicy.md) | Delete a data policy.| 16 | |[pv policystore deleteDataPolicyScope](./deleteDataPolicyScope.md) | Delete a data policy scope. | 17 | |[pv policystore putDataPolicy](./putDataPolicy.md) | Create or update a data policy. | 18 | |[pv policystore putDataPolicyScope](./putDataPolicyScope.md) | Create or update a data policy scope. | 19 | |[pv policystore readDataPolicies](./readDataPolicies.md) | Get data policies. | 20 | |[pv policystore readDataPolicyScopes](./readDataPolicyScopes.md) | Get scopes for a data policy. | 21 | -------------------------------------------------------------------------------- /doc/commands/account/getAccessKeys.md: -------------------------------------------------------------------------------- 1 | # pv account getAccessKeys 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > getAccessKeys 3 | 4 | ## Description 5 | List the authorization keys associated with this account. 6 | 7 | ## Syntax 8 | ``` 9 | pv account getAccessKeys 10 | ``` 11 | 12 | ## Required Arguments 13 | *None* 14 | 15 | ## Optional Arguments 16 | *None* 17 | 18 | ## API Mapping 19 | Account Data Plane > Accounts > [Get Access Keys](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/accounts/get-access-keys) 20 | ``` 21 | POST https://{accountName}.purview.azure.com/account/listkeys 22 | ``` 23 | 24 | ## Examples 25 | Get access keys (e.g. Atlas Kafka endpoint connection strings). 26 | ```powershell 27 | pv account getAccessKeys 28 | ``` 29 | 30 |
Sample response. 31 |

32 | 33 | ```json 34 | { 35 | "atlasKafkaPrimaryEndpoint": "Endpoint=sb://atlas-YOUR_ENDPOINT.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=YOUR_KEY", 36 | "atlasKafkaSecondaryEndpoint": "Endpoint=sb://atlas-YOUR_ENDPOINT.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=YOUR_KEY" 37 | } 38 | ``` 39 |

40 |
-------------------------------------------------------------------------------- /doc/commands/management/checkNameAvailability.md: -------------------------------------------------------------------------------- 1 | # pv management checkNameAvailability 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > checkNameAvailability 3 | 4 | ## Description 5 | Checks the account name availability. 6 | 7 | ## Syntax 8 | ``` 9 | pv management checkNameAvailability --subscriptionId= --accountName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--accountName` (string) 17 | The name of the account. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Accounts > [Check Name Availability](https://docs.microsoft.com/en-us/rest/api/purview/accounts/check-name-availability) 24 | ``` 25 | POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Purview/checkNameAvailability 26 | ``` 27 | 28 | ## Examples 29 | Check if the account name is available. 30 | ```powershell 31 | pv management checkNameAvailability --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --accountName "my-new-purview-account-name" 32 | ``` 33 | 34 |
Sample response. 35 |

36 | 37 | ```json 38 | { 39 | "nameAvailable": true 40 | } 41 | ``` 42 |

43 |
-------------------------------------------------------------------------------- /samples/json/entity/entities.json: -------------------------------------------------------------------------------- 1 | { 2 | "entities": [{ 3 | "status": "ACTIVE", 4 | "attributes": { 5 | "description": "Table01 is a custom entity.", 6 | "name": "Table01", 7 | "objectType": "U ", 8 | "qualifiedName": "mssql://sqlsvr.database.windows.net/sqldb/Schema/Table01" 9 | }, 10 | "typeName": "azure_sql_table" 11 | }, 12 | { 13 | "status": "ACTIVE", 14 | "attributes": { 15 | "description": "Table02 is a custom entity.", 16 | "name": "Table02", 17 | "objectType": "U ", 18 | "qualifiedName": "mssql://sqlsvr.database.windows.net/sqldb/Schema/Table02" 19 | }, 20 | "typeName": "azure_sql_table" 21 | }, 22 | { 23 | "status": "ACTIVE", 24 | "attributes": { 25 | "description": "Table03 is a custom entity.", 26 | "name": "Table03", 27 | "objectType": "U ", 28 | "qualifiedName": "mssql://sqlsvr.database.windows.net/sqldb/Schema/Table03" 29 | }, 30 | "typeName": "azure_sql_table" 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /doc/commands/glossary/put.md: -------------------------------------------------------------------------------- 1 | # pv glossary put 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > put 3 | 4 | ## Description 5 | Update the given glossary. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary put --glossaryGuid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--glossaryGuid` (string) 14 | The globally unique identifier for glossary. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Glossary > [Update Glossary](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/update-glossary) 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/{glossaryGuid} 26 | ``` 27 | 28 | ## Examples 29 | Update an existing glossary. 30 | ```powershell 31 | pv glossary put --glossaryGuid "f2307f48-5834-4709-be85-02f3aea5d149" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "guid": "f2307f48-5834-4709-be85-02f3aea5d149", 39 | "name": "Glossary", 40 | "qualifiedName": "Glossary", 41 | "longDescription": "Hello World!" 42 | } 43 | ``` 44 |

45 |
-------------------------------------------------------------------------------- /doc/commands/scan/putKeyVault.md: -------------------------------------------------------------------------------- 1 | # pv scan putKeyVault 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > putKeyVault 3 | 4 | ## Description 5 | Creates an instance of a key vault connection 6 | 7 | ## Syntax 8 | ``` 9 | pv scan putKeyVault --keyVaultName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--keyVaultName` (string) 14 | The key vault connection name. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Scanning Data Plane > Key Vault Connections > [Create](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/key-vault-connections/create) 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/scan/azureKeyVaults/{keyVaultName} 26 | ``` 27 | 28 | ## Examples 29 | Create a key vault connection. 30 | ```powershell 31 | pv scan putKeyVault --keyVaultName "My Key Vault" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "name": "My Key Vault", 39 | "properties": { 40 | "baseUrl": "https://mykv-keyvault.vault.azure.net/", 41 | "description": "" 42 | } 43 | } 44 | ``` 45 |

46 |
-------------------------------------------------------------------------------- /doc/commands/management/createAccount.md: -------------------------------------------------------------------------------- 1 | # pv management createAccount 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > createAccount 3 | 4 | ## Description 5 | Create or update an account resource 6 | 7 | ## Syntax 8 | ``` 9 | pv management createAccount --subscriptionId= --resourceGroupName= --accountName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account. 21 | 22 | `--payloadFile` (string) 23 | File path to a valid JSON document. 24 | 25 | ## Optional Arguments 26 | *None* 27 | 28 | ## API Mapping 29 | Accounts > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/accounts/create-or-update) 30 | ``` 31 | PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName} 32 | ``` 33 | 34 | ## Examples 35 | ```powershell 36 | pv management createAccount --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "synapse" --accountName "taygan-26fa7f24-pv" --payloadFile "/path/to/file.json" 37 | ``` -------------------------------------------------------------------------------- /doc/commands/glossary/createTerm.md: -------------------------------------------------------------------------------- 1 | # pv glossary createTerm 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > createTerm 3 | 4 | ## Description 5 | Create a glossary term. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary createTerm --payloadFile= [--includeTermHierarchy] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | `--includeTermHierarchy` (boolean) 18 | Whether to include the term hierarchy [default: false]. 19 | 20 | ## API Mapping 21 | Catalog Data Plane > Glossary > [Create Glossary Term](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/create-glossary-term) 22 | ``` 23 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/term 24 | ``` 25 | 26 | ## Examples 27 | Create a term. 28 | ```powershell 29 | pv glossary createTerm --payloadFile "/path/to/file.json" 30 | ``` 31 |
Example payload. 32 |

33 | 34 | ```json 35 | { 36 | "anchor": { 37 | "glossaryGuid": "125e2575-5823-4887-89f0-ff03a70f7c3a" 38 | }, 39 | "longDescription": "This is a basic term definition with no parent.", 40 | "name": "My Basic Term" 41 | } 42 | ``` 43 |

44 |
-------------------------------------------------------------------------------- /doc/commands/entity/deleteBusinessMetadata.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteBusinessMetadata 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteBusinessMetadata 3 | 4 | ## Description 5 | Remove business metadata from an entity. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteBusinessMetadata --guid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Delete Business Metadata](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-business-metadata) 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/businessmetadata 26 | ``` 27 | 28 | ## Examples 29 | Remove business metadata from an entity. 30 | ```powershell 31 | pv entity deleteBusinessMetadata --guid "0e945784-4bc3-40bb-a541-e8d1f7c9bf50" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "myBizMetadata1": { 39 | "bizAttr1": "myBizMetaData1.bizAttr1" 40 | } 41 | } 42 | ``` 43 |

44 |
-------------------------------------------------------------------------------- /doc/commands/glossary/putCategoryPartial.md: -------------------------------------------------------------------------------- 1 | # pv glossary putCategoryPartial 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > putCategoryPartial 3 | 4 | ## Description 5 | Update the glossary category partially. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary putCategoryPartial --categoryGuid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--categoryGuid` (string) 14 | The globally unique identifier of the category. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Glossary > [Partial Update Glossary Category](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/partial-update-glossary-category) 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/category/{categoryGuid}/partial 26 | ``` 27 | 28 | ## Examples 29 | Updated simple attributes of a category. 30 | ```powershell 31 | pv glossary putCategoryPartial --categoryGuid "c856ecef-21e6-4e92-8607-9493d8432e78" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "longDescription": "Example Long Description" 39 | } 40 | ``` 41 |

42 |
-------------------------------------------------------------------------------- /doc/commands/entity/changeCollection.md: -------------------------------------------------------------------------------- 1 | # pv entity changeCollection 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > changeCollection 3 | 4 | ## Description 5 | Move existing entities to the target collection. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity changeCollection --collection= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--collection` (string) 14 | The collection unique name. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Collection > [Move Entities To Collection](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/collection/move-entities-to-collection) 24 | ``` 25 | POST https://{accountName}.purview.azure.com/catalog/api/collections/{collection}/entity/moveHere 26 | ``` 27 | 28 | ## Examples 29 | Move a list of existing entities to a target collection. 30 | ```powershell 31 | pv entity changeCollection --collection "tdumy6" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "entityGuids": [ 39 | "8409533f-698b-405e-8e99-40f6f6f60000", 40 | "893c32e2-cfdb-4c25-bfec-d19610465d50" 41 | ] 42 | } 43 | ``` 44 |

45 |
-------------------------------------------------------------------------------- /doc/commands/scan/runScan.md: -------------------------------------------------------------------------------- 1 | # pv scan runScan 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > runScan 3 | 4 | ## Description 5 | Run a scan. 6 | 7 | ## Syntax 8 | ``` 9 | pv scan runScan --dataSourceName= --scanName= [--scanLevel=] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | ## Optional Arguments 20 | `--scanLevel` (string) 21 | The scan level type (Full or Incremental). 22 | 23 | ## API Mapping 24 | Scanning Data Plane > Scan Result > [Run Scan](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scan-result/run-scan) 25 | ``` 26 | PUT https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName}/run 27 | ``` 28 | 29 | ## Examples 30 | Run a scan by data source name and scan name. 31 | ```powershell 32 | pv scan runScan --dataSourceName "AzureDataLakeStorage-Gbm" --scanName "Scan-Xei" 33 | ``` 34 |
Sample response. 35 |

36 | 37 | ```json 38 | { 39 | "endTime": null, 40 | "error": null, 41 | "scanResultId": "7b8fd6fa-3ff5-457a-8689-718c9716689e", 42 | "startTime": "2022-02-27T21:10:39.2802905Z", 43 | "status": "Accepted" 44 | } 45 | ``` 46 |

47 |
-------------------------------------------------------------------------------- /doc/commands/entity/importBusinessMetadata.md: -------------------------------------------------------------------------------- 1 | # pv entity importBusinessMetadata 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > importBusinessMetadata 3 | 4 | ## Description 5 | Import business metadata in bulk from a CSV file. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity importBusinessMetadata --bmFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--bmFile` (string) 14 | File path to a valid business metadata template CSV file. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Entity > [Import Business Attributes](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/import-business-attributes) 21 | ``` 22 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/businessmetadata/import 23 | ``` 24 | 25 | ## Examples 26 | Import business metadata in bulk from a CSV file. 27 | ```powershell 28 | pv entity importBusinessMetadata --bmFile "/path/to/template.csv" 29 | ``` 30 |
Example CSV. 31 |

32 | 33 | ```csv 34 | EntityType,EntityUniqueAttributeValue,BusinessAttributeName,BusinessAttributeValue,EntityUniqueAttributeName[optional] 35 | azure_datalake_gen2_path,https://STORAGE_ACCOUNT.dfs.core.windows.net/bing/data/merged.parquet,myBizMetadata1.bizAttr1,hello, 36 | ``` 37 |

38 |
-------------------------------------------------------------------------------- /doc/commands/glossary/putPartial.md: -------------------------------------------------------------------------------- 1 | # pv glossary putPartial 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > putPartial 3 | 4 | ## Description 5 | Update the glossary partially. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary putPartial --glossaryGuid= --payloadFile= [--includeTermHierarchy] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--glossaryGuid` (string) 14 | The globally unique identifier for glossary. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | `--includeTermHierarchy` (boolean) 21 | Whether to include the term hierarchy [default: false]. 22 | 23 | ## API Mapping 24 | Catalog Data Plane > Glossary > [Partial Update Glossary](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/partial-update-glossary) 25 | ``` 26 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/{glossaryGuid}/partial 27 | ``` 28 | 29 | ## Examples 30 | Update an existing glossary. 31 | ```powershell 32 | pv glossary putPartial --glossaryGuid "f2307f48-5834-4709-be85-02f3aea5d149" --payloadFile "/path/to/file.json" 33 | ``` 34 |
Example payload. 35 |

36 | 37 | ```json 38 | { 39 | "longDescription": "This is a long description!" 40 | } 41 | ``` 42 |

43 |
-------------------------------------------------------------------------------- /doc/commands/glossary/createCategories.md: -------------------------------------------------------------------------------- 1 | # pv glossary createCategories 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > createCategories 3 | 4 | ## Description 5 | Create glossary category in bulk. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary createCategories --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [Create Glossary Categories](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/create-glossary-categories) 21 | ``` 22 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/categories 23 | ``` 24 | 25 | ## Examples 26 | Create categories in bulk. 27 | ```powershell 28 | pv glossary createCategories --payloadFile "/path/to/file.json" 29 | ``` 30 |
Example payload. 31 |

32 | 33 | ```json 34 | [ 35 | { 36 | "anchor": { 37 | "glossaryGuid": "f2307f48-5834-4709-be85-02f3aea5d149" 38 | }, 39 | "name": "Category1" 40 | }, 41 | { 42 | "anchor": { 43 | "glossaryGuid": "f2307f48-5834-4709-be85-02f3aea5d149" 44 | }, 45 | "name": "Category2" 46 | } 47 | ] 48 | ``` 49 |

50 |
-------------------------------------------------------------------------------- /purviewcli/cli/account.py: -------------------------------------------------------------------------------- 1 | """ 2 | usage: 3 | pv account deleteCollection --collectionName= 4 | pv account deleteResourceSetRule 5 | pv account getAccessKeys 6 | pv account getAccount 7 | pv account getChildCollectionNames --collectionName= 8 | pv account getCollection --collectionName= 9 | pv account getCollectionPath --collectionName= 10 | pv account getCollections 11 | pv account getResourceSetRule 12 | pv account getResourceSetRules 13 | pv account putCollection --friendlyName= --parentCollection= 14 | pv account putResourceSetRule --payloadFile= 15 | pv account regenerateAccessKeys --keyType= 16 | pv account updateAccount --friendlyName= 17 | 18 | 19 | options: 20 | --purviewName= [string] Azure Purview account name. 21 | --collectionName= [string] The technical name of the collection. 22 | --keyType= [string] The access key type. 23 | --friendlyName= [string] The friendly name for the azure resource. 24 | --parentCollection= [string] Gets or sets the parent collection reference. 25 | --payloadFile= [string] File path to a valid JSON document. 26 | 27 | """ 28 | from docopt import docopt 29 | 30 | if __name__ == '__main__': 31 | arguments = docopt(__doc__) 32 | -------------------------------------------------------------------------------- /doc/commands/glossary/putTermPartial.md: -------------------------------------------------------------------------------- 1 | # pv glossary putTermPartial 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > putTermPartial 3 | 4 | ## Description 5 | Update the glossary term partially. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary putTermPartial --termGuid= --payloadFile= [--includeTermHierarchy] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--termGuid` (string) 14 | The globally unique identifier for glossary term. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | `--includeTermHierarchy` (boolean) 21 | Whether to include the term hierarchy. 22 | 23 | ## API Mapping 24 | Catalog Data Plane > Glossary > [Partial Update Glossary Term](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/partial-update-glossary-term) 25 | ``` 26 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/term/{termGuid}/partial 27 | ``` 28 | 29 | ## Examples 30 | Update a basic attribute of an existing glossary term. 31 | ```powershell 32 | pv glossary putTermPartial --termGuid "919e8f87-d5b2-4dde-9f6e-1bbd738536a1" --payloadFile "/path/to/file.json" 33 | ``` 34 |
Example payload. 35 |

36 | 37 | ```json 38 | { 39 | "longDescription": "Updated description!" 40 | } 41 | ``` 42 |

43 |
-------------------------------------------------------------------------------- /doc/commands/scan/readKeyVault.md: -------------------------------------------------------------------------------- 1 | # pv scan readKeyVault 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > readKeyVault 3 | 4 | ## Description 5 | Gets key vault information 6 | 7 | ## Syntax 8 | ``` 9 | pv scan readKeyVault --keyVaultName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--keyVaultName` (string) 14 | The name of the key vault connection. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Scanning Data Plane > Key Vault Connections > [Get](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/key-vault-connections/get) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/scan/azureKeyVaults/{keyVaultName} 23 | ``` 24 | 25 | ## Examples 26 | Get Azure Key Vault connection information by name. 27 | ```powershell 28 | pv scan readKeyVault --keyVaultName "my_key_vault" 29 | ``` 30 |
Sample response. 31 |

32 | 33 | ```json 34 | { 35 | "id": "/subscriptions/2c141777-2036-4ba0-a7f4-bbca73a181bf/resourceGroups/scanning-prod-westeurope/providers/Microsoft.Purview/accounts/purview-c66c7ceb-1944-4393-ae27-20497005f353/linkedservices/my_key_vault", 36 | "name": "my_key_vault", 37 | "properties": { 38 | "baseUrl": "https://pvdemofngxi-keyvault.vault.azure.net/", 39 | "description": "" 40 | } 41 | } 42 | ``` 43 |

44 |
-------------------------------------------------------------------------------- /doc/commands/account/getCollectionPath.md: -------------------------------------------------------------------------------- 1 | # pv account getCollectionPath 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > getCollectionPath 3 | 4 | ## Description 5 | Gets the parent name and parent friendly name chains that represent the collection path. 6 | 7 | ## Syntax 8 | ``` 9 | pv account getCollectionPath --collectionName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--collectionName` (string) 14 | This is the unique name of the collection (not the friendly name). 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Account Data Plane > Collections > [Get Collection Path](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/collections/get-collection-path) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/account/collections/{collectionName}/getCollectionPath 23 | ``` 24 | 25 | ## Examples 26 | Get the collection path (parent references) for a collection by name. 27 | ```powershell 28 | pv account getCollectionPath --collectionName "w0kfma" 29 | ``` 30 | 31 |
Sample response. 32 |

33 | 34 | ```json 35 | { 36 | "parentFriendlyNameChain": [ 37 | "Root Collection Friendly Name", 38 | "Social" 39 | ], 40 | "parentNameChain": [ 41 | "esg-26fa7f24-pv", 42 | "6b93rz" 43 | ] 44 | } 45 | ``` 46 |

47 |
-------------------------------------------------------------------------------- /doc/commands/entity/deleteBusinessAttribute.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteBusinessAttribute 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteBusinessAttribute 3 | 4 | ## Description 5 | Delete business metadata from an entity. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteBusinessAttribute --guid= --bmName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--bmName` (string) 17 | The name of the business metadata. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Delete Business Attributes](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-business-attributes) 27 | ``` 28 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/businessmetadata/{bmName} 29 | ``` 30 | 31 | ## Examples 32 | Delete business metadata from an entity. 33 | ```powershell 34 | pv entity deleteBusinessAttribute --guid "0e945784-4bc3-40bb-a541-e8d1f7c9bf50" --bmName "myBizMetadata1" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | { 41 | "bizAttr1": "bizAttr1" 42 | } 43 | ``` 44 |

45 |
-------------------------------------------------------------------------------- /doc/commands/entity/createBulkClassification.md: -------------------------------------------------------------------------------- 1 | # pv entity createBulkClassification 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > createBulkClassification 3 | 4 | ## Description 5 | Associate a classification to multiple entities in bulk. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity createBulkClassification --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Entity > [Add Classification](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-classification) 21 | ``` 22 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/bulk/classification 23 | ``` 24 | 25 | ## Examples 26 | Associate a classification to multiple entities. 27 | ```powershell 28 | pv entity createBulkClassification --payloadFile "/path/to/file.json" 29 | ``` 30 |
Example payload. 31 |

32 | 33 | ```json 34 | { 35 | "classification": { 36 | "typeName": "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER" 37 | }, 38 | "entityGuids": [ 39 | "c6a7811a-0699-44d0-b0be-68babe560ab2", 40 | "6374e9e8-4719-4747-b2d2-054548023ae2", 41 | "dcd41879-dda2-4b3c-8c97-9b76d39799b1" 42 | ] 43 | } 44 | ``` 45 |

46 |
-------------------------------------------------------------------------------- /samples/json/enterprise_scale/data_management_lz_sources.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "kind": "Collection", 4 | "name": "Contoso" 5 | }, 6 | { 7 | "properties": { 8 | "parentCollection": { 9 | "type": "DataSourceReference", 10 | "referenceName": "Contoso" 11 | } 12 | }, 13 | "kind": "Collection", 14 | "name": "Contoso-Data-Management" 15 | }, 16 | { 17 | "properties": { 18 | "subscriptionId": "01234567-89ab-cdef-0123-456789abcdef", 19 | "parentCollection": { 20 | "type": "DataSourceReference", 21 | "referenceName": "Contoso-Data-Management" 22 | }, 23 | "collection": null 24 | }, 25 | "kind": "AzureSubscription", 26 | "id": "datasources/AzureSubscription", 27 | "name": "Contoso-Data-Management-AzureSubscription" 28 | }, 29 | { 30 | "properties": { 31 | "tenant": "01234567-89ab-cdef-0123-456789abcdef", 32 | "parentCollection": { 33 | "type": "DataSourceReference", 34 | "referenceName": "Contoso-Data-Management" 35 | }, 36 | "collection": null 37 | }, 38 | "kind": "PowerBI", 39 | "id": "datasources/PowerBI", 40 | "name": "Contoso-PowerBI" 41 | } 42 | ] -------------------------------------------------------------------------------- /doc/commands/entity/createClassifications.md: -------------------------------------------------------------------------------- 1 | # pv entity createClassifications 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > createClassifications 3 | 4 | ## Description 5 | Add classifications to an existing entity represented by a GUID. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity createClassifications --guid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Add Classifications](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-classifications) 24 | ``` 25 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/classifications 26 | ``` 27 | 28 | ## Examples 29 | Associate an entity to multiple classifications. 30 | ```powershell 31 | pv entity createClassifications --guid "04f2bb30-91db-404b-a8e1-d65e45338929" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | [ 38 | { 39 | "typeName": "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER" 40 | }, 41 | { 42 | "typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER" 43 | } 44 | ] 45 | ``` 46 |

47 |
-------------------------------------------------------------------------------- /doc/commands/entity/putClassifications.md: -------------------------------------------------------------------------------- 1 | # pv entity putClassifications 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > putClassifications 3 | 4 | ## Description 5 | Update classifications to an existing entity represented by a guid. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity putClassifications --guid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Update Classifications](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/update-classifications) 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/classifications 26 | ``` 27 | 28 | ## Examples 29 | Update existing classifications to an existing entity via the entity GUID. 30 | ```powershell 31 | pv entity putClassifications --guid "bbb9ff1d-f880-435e-ac87-d6fd5676d8f0" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | [ 38 | 39 | { 40 | "typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", 41 | "attributes": { 42 | "confidence": 2 43 | } 44 | } 45 | ] 46 | ``` 47 |

48 |
-------------------------------------------------------------------------------- /doc/commands/entity/addOrUpdateBusinessAttribute.md: -------------------------------------------------------------------------------- 1 | # pv entity addOrUpdateBusinessAttribute 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > addOrUpdateBusinessAttribute 3 | 4 | ## Description 5 | Add or update business attributes to an entity. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity addOrUpdateBusinessAttribute --guid= --bmName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--bmName` (string) 17 | The name of the business metadata. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Add Or Update Business Attributes](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-or-update-business-attributes) 27 | ``` 28 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/businessmetadata/{bmName} 29 | ``` 30 | 31 | ## Examples 32 | Add or update business attributes to an entity. 33 | ```powershell 34 | pv entity addOrUpdateBusinessAttribute --guid "0e945784-4bc3-40bb-a541-e8d1f7c9bf50" --bmName "myBizMetadata1" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | { 41 | "bizAttr1": "bizAttr1" 42 | } 43 | ``` 44 |

45 |
-------------------------------------------------------------------------------- /doc/commands/types/deleteTypeDefs.md: -------------------------------------------------------------------------------- 1 | # pv types deleteTypeDefs 2 | [Command Reference](../../../README.md#command-reference) > [types](./main.md) > deleteTypeDefs 3 | 4 | ## Description 5 | Delete API for all types in bulk. 6 | 7 | ## Syntax 8 | ``` 9 | pv types deleteTypeDefs --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Types > [Delete Type Definitions](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/types/delete-type-definitions) 21 | ``` 22 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/types/typedefs 23 | ``` 24 | 25 | ## Examples 26 | Delete type definitions in bulk. 27 | ```powershell 28 | pv types deleteTypeDefs --payloadFile "/path/to/file.json" 29 | ``` 30 | 31 |
Example payload. 32 |

33 | 34 | ```json 35 | { 36 | "classificationDefs": [ 37 | { 38 | "category": "CLASSIFICATION", 39 | "name": "CUSTOM.PII.PATIENT.IDENTITY.CARD" 40 | }, 41 | { 42 | "category": "CLASSIFICATION", 43 | "name": "CUSTOM.PII.PATIENT.POLICY.NUMBER" 44 | } 45 | ], 46 | "entityDefs": [], 47 | "enumDefs": [], 48 | "relationshipDefs": [], 49 | "structDefs": [] 50 | } 51 | ``` 52 |

53 |
-------------------------------------------------------------------------------- /doc/commands/policystore/putDataPolicyScope.md: -------------------------------------------------------------------------------- 1 | # pv policystore putDataPolicyScope 2 | [Command Reference](../../../README.md#command-reference) > [policystore](./main.md) > putDataPolicyScope 3 | 4 | ## Description 5 | Create or update a data policy scope. 6 | 7 | ## Syntax 8 | ``` 9 | pv policystore putDataPolicyScope --policyName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--policyName` (string) 14 | The name of the data policy. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Create or update a data policy scope. 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/policystore/dataPolicies/{policyName}/scopes 26 | ``` 27 | 28 | ## Examples 29 | Create or update a data policy scope. 30 | ```powershell 31 | pv policystore putDataPolicyScope --policyName "new-policy" --payloadFile "/path/to/file.json" 32 | ``` 33 | 34 |
Example payload. 35 |

36 | 37 | ```json 38 | { 39 | "properties": { 40 | "dataSourceScope": "/subscriptions/2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0/resourcegroups/pvdemo-rg-crv3k/providers/microsoft.storage/storageaccounts/pvdemocrv3kadls", 41 | "dataSourceSubscription": "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0", 42 | "datasource": "AzureDataLakeStorage", 43 | "policyName": "new-policy" 44 | } 45 | } 46 | ``` 47 |

48 |
-------------------------------------------------------------------------------- /doc/commands/share/createSentShare.md: -------------------------------------------------------------------------------- 1 | # pv share createSentShare 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > createSentShare 4 | 5 | ## Description 6 | 7 | Create a sent share in the given Purview account. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share createSentShare --sentShareName= --payloadFile= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | `--payloadFile` (string) 22 | 23 | File path to a valid JSON document. 24 | 25 | ## Optional Arguments 26 | 27 | *None* 28 | 29 | ## API Mapping 30 | 31 | Share Data Plane > Sent Shares > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/sent-shares/create-or-update) 32 | ``` 33 | PUT https://{accountName}.purview.azure.com/share/sentShares/{sentShareName} 34 | ``` 35 | 36 | ## Examples 37 | 38 | Create a sent share. 39 | 40 | ```powershell 41 | pv share createSentShare --sentShareName "MyNewSentShare" --payloadFile "/path/to/file.json" 42 | ``` 43 | 44 | 45 |
Example payload. 46 |

47 | 48 | ```json 49 | { 50 | "properties": { 51 | "description": "This is a friendly description.", 52 | "collection": { 53 | "referenceName": "pvdemo52dg4-pv", 54 | "type": "CollectionReference" 55 | } 56 | }, 57 | "shareKind": "InPlace" 58 | } 59 | ``` 60 |

61 |
62 | -------------------------------------------------------------------------------- /doc/commands/scan/putScan.md: -------------------------------------------------------------------------------- 1 | # pv scan putScan 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > putScan 3 | 4 | ## Description 5 | Creates an instance of a scan 6 | 7 | ## Syntax 8 | ``` 9 | pv scan putScan --dataSourceName= --scanName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Scanning Data Plane > Scans > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scans/create-or-update) 27 | ``` 28 | PUT https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName} 29 | ``` 30 | 31 | ## Examples 32 | Create a scan. 33 | ```powershell 34 | pv scan putScan --dataSourceName "AzureDataLakeStorage-Gbm" --scanName "Scan-ABC" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | { 41 | "kind": "AdlsGen2Msi", 42 | "name": "Scan-ABC", 43 | "properties": { 44 | "collection": { 45 | "referenceName": "esg-26fa7f24-pv", 46 | "type": "CollectionReference" 47 | }, 48 | "scanRulesetName": "AdlsGen2", 49 | "scanRulesetType": "System" 50 | } 51 | } 52 | ``` 53 |

54 |
-------------------------------------------------------------------------------- /doc/commands/entity/addOrUpdateBusinessMetadata.md: -------------------------------------------------------------------------------- 1 | # pv entity addOrUpdateBusinessMetadata 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > addOrUpdateBusinessMetadata 3 | 4 | ## Description 5 | Add or update business metadata to an entity. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity addOrUpdateBusinessMetadata --guid= --payloadFile= [--isOverwrite] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | `--isOverwrite` (boolean) 21 | Whether to overwrite the existing business metadata on the entity or not [default: false]. 22 | 23 | ## API Mapping 24 | Catalog Data Plane > Entity > [Add Or Update Business Metadata](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-or-update-business-metadata) 25 | ``` 26 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/businessmetadata 27 | ``` 28 | 29 | ## Examples 30 | Add or update business metadata to an entity. 31 | ```powershell 32 | pv entity addOrUpdateBusinessMetadata --guid "0e945784-4bc3-40bb-a541-e8d1f7c9bf50" --payloadFile "/path/to/file.json" 33 | ``` 34 |
Example payload. 35 |

36 | 37 | ```json 38 | { 39 | "myBizMetadata1": { 40 | "bizAttr1": "myBizMetaData1.bizAttr1" 41 | } 42 | } 43 | ``` 44 |

45 |
-------------------------------------------------------------------------------- /doc/commands/glossary/putTerm.md: -------------------------------------------------------------------------------- 1 | # pv glossary putTerm 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > putTerm 3 | 4 | ## Description 5 | Update the given glossary term by its GUID. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary putTerm --termGuid= --payloadFile= [--includeTermHierarchy] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--termGuid` (string) 14 | The globally unique identifier for glossary term. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | `--includeTermHierarchy` (boolean) 21 | Whether to include the term hierarchy. 22 | 23 | ## API Mapping 24 | Catalog Data Plane > Glossary > [Update Glossary Term](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/update-glossary-term) 25 | ``` 26 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/term/{termGuid} 27 | ``` 28 | 29 | ## Examples 30 | Update an existing glossary term. 31 | ```powershell 32 | pv glossary putTerm --termGuid "919e8f87-d5b2-4dde-9f6e-1bbd738536a1" --payloadFile "/path/to/file.json" 33 | ``` 34 |
Example payload. 35 |

36 | 37 | ```json 38 | { 39 | "anchor": { 40 | "glossaryGuid": "125e2575-5823-4887-89f0-ff03a70f7c3a" 41 | }, 42 | "name": "My Term", 43 | "qualifiedName": "My Term@Glossary", 44 | "longDescription": "Hello World!", 45 | "status": "Approved" 46 | } 47 | ``` 48 |

49 |
-------------------------------------------------------------------------------- /doc/commands/relationship/create.md: -------------------------------------------------------------------------------- 1 | # pv relationship create 2 | [Command Reference](../../../README.md#command-reference) > [relationship](./main.md) > create 3 | 4 | ## Description 5 | Create a new relationship between entities. 6 | 7 | ## Syntax 8 | ``` 9 | pv relationship create --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Relationship > [Create](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/relationship/create) 21 | ``` 22 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/relationship 23 | ``` 24 | 25 | ## Examples 26 | Create a new relationship. 27 | ```powershell 28 | pv relationship create --payloadFile "/path/to/file.json" 29 | ``` 30 |
Example payload. 31 |

32 | 33 | ```json 34 | { 35 | "end1": { 36 | "typeName": "azure_sql_schema", 37 | "uniqueAttributes": { 38 | "qualifiedName": "mssql://pvdemofngxi-sqlsvr.database.windows.net/pvdemofngxi-sqldb/SalesLT" 39 | } 40 | }, 41 | "end2": { 42 | "typeName": "azure_sql_table", 43 | "uniqueAttributes": { 44 | "qualifiedName": "mssql://pvdemofngxi-sqlsvr.database.windows.net/pvdemofngxi-sqldb/SalesLT/Customer" 45 | } 46 | }, 47 | "typeName": "azure_sql_schema_tables" 48 | } 49 | ``` 50 |

51 |
-------------------------------------------------------------------------------- /samples/csv/assets.csv: -------------------------------------------------------------------------------- 1 | guid,qualifiedName 2 | 6284874d-d8f6-4d4e-8295-1496f4abbde6,https://pvdemoxv2huadls.dfs.core.windows.net/bing/data/merged.parquet 3 | 3b5a142d-0302-42a4-9f3b-c1ad031488d5,https://pvdemoxv2huadls.dfs.core.windows.net/bing/data/{N}/QueriesByState_{Year}-{Month}-{Day}_{N}-{N}-{N}.tsv 4 | 1a978d08-bfb9-4816-be39-b04f201b62cd,https://pvdemoxv2huadls.dfs.core.windows.net/bing/data/{N}/QueriesByCountry_{Year}-{Month}-{Day}_{N}-{N}-{N}.tsv 5 | 52534d92-7b4e-470f-8992-1df6f6f60000,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/Address 6 | 99403f06-e1a9-4e90-924a-fff6f6f60000,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/Customer 7 | 5af84c16-4af2-41d0-9913-5cefdc02136d,https://pvdemoxv2huadls.dfs.core.windows.net/bing/README.md 8 | 9fdd9cc9-4d5d-4399-bf09-ff4bd9bf0d60,https://pvdemoxv2huadls.dfs.core.windows.net/bing/SECURITY.md 9 | 1d9f9853-5689-4c2b-bf77-69b3138546db,https://pvdemoxv2huadls.dfs.core.windows.net/bing/CODE_OF_CONDUCT.md 10 | b15f6dce-b9e5-465a-85e9-267c3e80e017,https://pvdemoxv2huadls.dfs.core.windows.net/bing/LICENSE 11 | 91be9185-bd7c-4255-a9b4-32f6f6f60000,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/ProductDescription 12 | b04d1d31-fbd8-4e93-88c7-16f6f6f60000,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/vProductAndDescription 13 | 212adf04-a06c-4712-8875-43f6f6f60000,mssql://pvdemoxv2hu-sqlsvr.database.windows.net/pvdemoxv2hu-sqldb/SalesLT/ProductCategory 14 | -------------------------------------------------------------------------------- /doc/commands/management/updateAccount.md: -------------------------------------------------------------------------------- 1 | # pv management updateAccount 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > updateAccount 3 | 4 | ## Description 5 | Patches the account resource. 6 | 7 | ## Syntax 8 | ``` 9 | pv management updateAccount --subscriptionId= --resourceGroupName= --accountName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account. 21 | 22 | `--payloadFile` (string) 23 | File path to a valid JSON document. 24 | 25 | ## Optional Arguments 26 | *None* 27 | 28 | ## API Mapping 29 | Accounts > [Update](https://docs.microsoft.com/en-us/rest/api/purview/accounts/update) 30 | ``` 31 | PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName} 32 | ``` 33 | 34 | ## Examples 35 | Add a new tag to an existing Azure Purview account. 36 | ```powershell 37 | pv management updateAccount --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "esg" --accountName "my-purview-account" --payloadFile "/path/to/file.json" 38 | ``` 39 |
Example payload. 40 |

41 | 42 | ```json 43 | { 44 | "tags": { 45 | "newTag": "New tag value." 46 | } 47 | } 48 | ``` 49 |

50 |
-------------------------------------------------------------------------------- /doc/commands/entity/deleteUniqueAttributeClassification.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteUniqueAttributeClassification 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteUniqueAttributeClassification 3 | 4 | ## Description 5 | Delete a given classification from an entity identified by its type and unique attributes. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteUniqueAttributeClassification --typeName= --qualifiedName= --classificationName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--typeName` (string) 14 | The name of the type. 15 | 16 | `--qualifiedName` (string) 17 | The qualified name of the entity. 18 | 19 | `--classificationName` (string) 20 | The name of the classification. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Delete Classification By Unique Attribute](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-classification-by-unique-attribute) 27 | ``` 28 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/classification/{classificationName} 29 | ``` 30 | 31 | ## Examples 32 | Remove a classification from an entity via the entities qualified name. 33 | ```powershell 34 | pv entity deleteUniqueAttributeClassification --typeName "azure_datalake_gen2_filesystem" --qualifiedName "https://esg26fa7f24adls.dfs.core.windows.net/02-silver" --classificationName "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER" 35 | ``` -------------------------------------------------------------------------------- /doc/commands/glossary/readTermsImport.md: -------------------------------------------------------------------------------- 1 | # pv glossary readTermsImport 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > readTermsImport 3 | 4 | ## Description 5 | Get the status of an import CSV operation. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary readTermsImport --operationGuid= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--operationGuid` (string) 14 | The globally unique identifier for async operation/job. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Glossary > [Get Import Csv Operation Status](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/get-import-csv-operation-status) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/catalog/api/glossary/terms/import/{operationGuid} 23 | ``` 24 | 25 | ## Examples 26 | Get the status of an import CSV operation. 27 | ```powershell 28 | pv glossary readTermsImport --operationGuid "54c3e5d0-90b3-4249-851c-0e3c4dba33c1" 29 | ``` 30 | 31 |
Sample response. 32 |

33 | 34 | ```json 35 | { 36 | "createTime": "2022-02-06T22:19:48.949+0000", 37 | "error": { 38 | "errorCode": 0, 39 | "errorMessage": "" 40 | }, 41 | "id": "54c3e5d0-90b3-4249-851c-0e3c4dba33c1", 42 | "lastUpdateTime": "2022-02-06T22:19:50.824+0000", 43 | "properties": { 44 | "importedTerms": "51", 45 | "totalTermsDetected": "51" 46 | }, 47 | "status": "SUCCEED" 48 | } 49 | ``` 50 |

51 |
-------------------------------------------------------------------------------- /doc/commands/account/regenerateAccessKeys.md: -------------------------------------------------------------------------------- 1 | # pv account regenerateAccessKeys 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > regenerateAccessKeys 3 | 4 | ## Description 5 | Regenerate the authorization keys associated with this data catalog. 6 | 7 | ## Syntax 8 | ``` 9 | pv account regenerateAccessKeys --keyType= 10 | ``` 11 | 12 | ## Required Arguments 13 | *None* 14 | 15 | ## Optional Arguments 16 | *None* 17 | 18 | ## API Mapping 19 | Account Data Plane > Accounts > [Regenerate Access Key](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/accounts/regenerate-access-key) 20 | ``` 21 | POST https://{accountName}.purview.azure.com/account/regeneratekeys 22 | ``` 23 | 24 | ## Examples 25 | Regenerate the primary Atlas Kafka authorization key. 26 | ```powershell 27 | pv account regenerateAccessKeys --keyType "PrimaryAtlasKafkaKey" 28 | ``` 29 | 30 |
Sample response. 31 |

32 | 33 | ```json 34 | { 35 | "atlasKafkaPrimaryEndpoint": "Endpoint=sb://YOUR_ENDPOINT.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=YOUR_NEW_KEY", 36 | "atlasKafkaSecondaryEndpoint": "Endpoint=sb://YOUR_ENDPOINT.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=YOUR_NEW_KEY" 37 | } 38 | ``` 39 |

40 |
41 | 42 | Regenerate the secondary Atlas Kafka authorization key. 43 | ```powershell 44 | pv account regenerateAccessKeys --keyType "SecondaryAtlasKafkaKey" 45 | ``` 46 | -------------------------------------------------------------------------------- /doc/commands/entity/deleteUniqueAttribute.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteUniqueAttribute 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteUniqueAttribute 3 | 4 | ## Description 5 | Delete an entity identified by its type and unique attributes. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteUniqueAttribute --typeName= --qualifiedName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--typeName` (string) 14 | The name of the type. 15 | 16 | `--qualifiedName` (string) 17 | The qualified name of the entity. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Delete By Unique Attribute](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-by-unique-attribute) 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/uniqueAttribute/type/{typeName} 26 | ``` 27 | 28 | ## Examples 29 | Delete an existing entity by its type name and qualified name. 30 | ```powershell 31 | pv entity deleteUniqueAttribute --typeName "azure_datalake_gen2_path" --qualifiedName "https://esg26fa7f24adls.dfs.core.windows.net/01-bronze/esg/filename.csv" 32 | ``` -------------------------------------------------------------------------------- /doc/commands/management/deletePrivateEndpoint.md: -------------------------------------------------------------------------------- 1 | # pv management deletePrivateEndpoint 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > deletePrivateEndpoint 3 | 4 | ## Description 5 | Deletes private endpoint connection. 6 | 7 | ## Syntax 8 | ``` 9 | pv management deletePrivateEndpoint --subscriptionId= --resourceGroupName= --accountName= --privateEndpointConnectionName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account 21 | 22 | `--privateEndpointConnectionName` (string) 23 | Name of the private endpoint connection. 24 | 25 | ## Optional Arguments 26 | *None* 27 | 28 | ## API Mapping 29 | Private Endpoint Connections > [Delete](https://docs.microsoft.com/en-us/rest/api/purview/private-endpoint-connections/delete) 30 | ``` 31 | DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName} 32 | ``` 33 | 34 | ## Examples 35 | Delete a private endpoint. 36 | ```powershell 37 | pv management deletePrivateEndpoint --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "private" --accountName "taygan-private-pv" --privateEndpointConnectionName "purview-pe-instance-a2dbee21-876d-43a4-b521-df9863a98553" 38 | ``` -------------------------------------------------------------------------------- /purviewcli/client/_lineage.py: -------------------------------------------------------------------------------- 1 | from .endpoint import Endpoint, decorator 2 | 3 | 4 | class Lineage(Endpoint): 5 | def __init__(self): 6 | Endpoint.__init__(self) 7 | self.app = 'catalog' 8 | 9 | @decorator 10 | def lineageRead(self, args): 11 | self.method = 'GET' 12 | self.endpoint = f'/api/atlas/v2/lineage/{args["--guid"]}' 13 | self.params = { 14 | 'depth': args.get('--depth', 3), 15 | 'width': args.get('--width', 6), 16 | 'direction': args.get('--direction', 'BOTH'), 17 | 'forceNewApi': 'true', 18 | 'includeParent': 'true', 19 | 'getDerivedLineage': 'true' 20 | } 21 | 22 | @decorator 23 | def lineageReadNext(self, args): 24 | self.method = 'GET' 25 | self.endpoint = f'/api/lineage/{args["--guid"]}/next/' 26 | self.params = { 27 | 'direction': args['--direction'], 28 | 'getDerivedLineage': 'true', 29 | 'offset': args['--offset'], 30 | 'limit': args['--limit'], 31 | 'api-version': '2021-05-01-preview' 32 | } 33 | 34 | # NOT SUPPORTED IN AZURE PURVIEW 35 | # @decorator 36 | # def lineageReadUniqueAttributeType(self, args): 37 | # self.method = 'GET' 38 | # self.endpoint = f'/api/atlas/v2/lineage/uniqueAttribute/type/{args["--typeName"]}' 39 | # self.params = { 40 | # 'depth': args.get('--depth', 3), 41 | # 'direction': args.get('--direction', 'BOTH') 42 | # } 43 | -------------------------------------------------------------------------------- /doc/commands/glossary/createTermsAssignedEntities.md: -------------------------------------------------------------------------------- 1 | # pv glossary createTermsAssignedEntities 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > createTermsAssignedEntities 3 | 4 | ## Description 5 | Assign the given term to the provided list of related objects. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary createTermsAssignedEntities --termGuid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--termGuid` (string) 14 | The globally unique identifier for glossary term. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Glossary > [Assign Term To Entities](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/assign-term-to-entities) 24 | ``` 25 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/terms/{termGuid}/assignedEntities 26 | ``` 27 | 28 | ## Examples 29 | Assign a term to one or more entities. 30 | ```powershell 31 | pv glossary createTermsAssignedEntities --termGuid "4ba01c1e-5ef8-4457-87b4-37e2054b1cb9" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | [ 38 | { 39 | "guid": "6374e9e8-4719-4747-b2d2-054548023ae2" 40 | }, 41 | { 42 | "guid": "dcd41879-dda2-4b3c-8c97-9b76d39799b1" 43 | }, 44 | { 45 | "guid": "9759ea81-bb37-48ee-8099-02e452ccc57d" 46 | } 47 | ] 48 | ``` 49 |

50 |
-------------------------------------------------------------------------------- /doc/commands/glossary/createTermsExport.md: -------------------------------------------------------------------------------- 1 | # pv glossary createTermsExport 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > createTermsExport 3 | 4 | ## Description 5 | Export glossary terms to a csv file. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary createTermsExport --glossaryGuid= --termGuid=... [--includeTermHierarchy] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--glossaryGuid` (string) 14 | The globally unique identifier for glossary. 15 | 16 | `--termGuid` (string) 17 | The globally unique identifier for glossary term. 18 | 19 | ## Optional Arguments 20 | `--includeTermHierarchy` (boolean) 21 | Whether to include the term hierarchy [default: false]. 22 | 23 | ## API Mapping 24 | Catalog Data Plane > Glossary > [Export Glossary Terms As Csv](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/export-glossary-terms-as-csv) 25 | ``` 26 | POST https://{accountName}.purview.azure.com/catalog/api/glossary/{glossaryGuid}/terms/export 27 | ``` 28 | 29 | ## Examples 30 | Export glossary terms to a CSV file. 31 | ```powershell 32 | pv glossary createTermsExport --glossaryGuid "125e2575-5823-4887-89f0-ff03a70f7c3a" --termGuid "4ba01c1e-5ef8-4457-87b4-37e2054b1cb9" --termGuid "9d1dec92-fb42-49ea-8fb8-5a0ff8898a64" --termGuid "8f925987-62d1-4ca7-a90b-3861162651e9" 33 | ``` 34 | 35 |
Sample response. 36 |

37 | 38 | ```json 39 | { 40 | "export": "/YOUR_FOLDER_PATH/export.csv", 41 | "status_code": 200 42 | } 43 | ``` 44 |

45 |
-------------------------------------------------------------------------------- /doc/commands/management/addRootCollectionAdmin.md: -------------------------------------------------------------------------------- 1 | # pv management addRootCollectionAdmin 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > addRootCollectionAdmin 3 | 4 | ## Description 5 | Add the administrator for root collection associated with this account. 6 | 7 | ## Syntax 8 | ``` 9 | pv management addRootCollectionAdmin --subscriptionId= --resourceGroupName= --accountName= --objectId= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account. 21 | 22 | `--objectId` (string) 23 | The object identifier of the admin. 24 | 25 | ## Optional Arguments 26 | *None* 27 | 28 | ## API Mapping 29 | Accounts > [Add Root Collection Admin](https://docs.microsoft.com/en-us/rest/api/purview/accounts/add-root-collection-admin) 30 | ``` 31 | POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/addRootCollectionAdmin 32 | ``` 33 | 34 | ## Examples 35 | Assign the collection administrator role to a user via their Azure AD object identifier at the root collection of the Azure Purview account. 36 | ```powershell 37 | pv management addRootCollectionAdmin --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "myrg" --accountName "my-purview-account" --objectId "ac2b4099-7d5a-4d71-b9e4-65325a82c487" 38 | ``` -------------------------------------------------------------------------------- /doc/commands/scan/putCredential.md: -------------------------------------------------------------------------------- 1 | # pv credential put 2 | [Command Reference](../../../README.md#command-reference) > [credential](./main.md) > put 3 | 4 | ## Description 5 | Create or update a credential. 6 | 7 | ## Syntax 8 | ``` 9 | pv scan putCredential --credentialName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--credentialName` (string) 14 | The name of the credential. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Create or update a credential. 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/scan/credentials/{credentialName} 26 | ``` 27 | 28 | ## Examples 29 | Create or update a credential. 30 | ```powershell 31 | pv scan putCredential --credentialName "my_new_sql_credential" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "name": "my_new_sql_credential", 39 | "properties": { 40 | "type": "SqlAuth", 41 | "typeProperties": { 42 | "password": { 43 | "secretName": "sql-secret-name", 44 | "secretVersion": "", 45 | "store": { 46 | "referenceName": "my_key_vault", 47 | "type": "LinkedServiceReference" 48 | }, 49 | "type": "AzureKeyVaultSecret" 50 | }, 51 | "user": "sql-user-name" 52 | } 53 | } 54 | } 55 | ``` 56 |

57 |
-------------------------------------------------------------------------------- /purviewcli/cli/types.py: -------------------------------------------------------------------------------- 1 | """ 2 | usage: 3 | pv types createTypeDefs --payloadFile= 4 | pv types deleteTypeDef --name= 5 | pv types deleteTypeDefs --payloadFile= 6 | pv types putTypeDefs --payloadFile= 7 | pv types readClassificationDef (--guid= | --name=) 8 | pv types readEntityDef (--guid= | --name=) 9 | pv types readEnumDef (--guid= | --name=) 10 | pv types readRelationshipDef (--guid= | --name=) 11 | pv types readStatistics 12 | pv types readStructDef (--guid= | --name=) 13 | pv types readBusinessMetadataDef (--guid= | --name=) 14 | pv types readTermTemplateDef (--guid= | --name=) 15 | pv types readTypeDef (--guid= | --name=) 16 | pv types readTypeDefs [--includeTermTemplate --type=] 17 | pv types readTypeDefsHeaders [--includeTermTemplate --type=] 18 | 19 | options: 20 | --purviewName= [string] Azure Purview account name. 21 | --guid= [string] The globally unique identifier. 22 | --includeTermTemplate [boolean] Whether to include termtemplatedef [default: false]. 23 | --name= [string] The name of the definition. 24 | --payloadFile= [string] File path to a valid JSON document. 25 | --type= [string] Typedef name as search filter (classification | entity | enum | relationship | struct). 26 | 27 | """ 28 | from docopt import docopt 29 | 30 | if __name__ == '__main__': 31 | arguments = docopt(__doc__) 32 | -------------------------------------------------------------------------------- /doc/commands/account/getChildCollectionNames.md: -------------------------------------------------------------------------------- 1 | # pv account getChildCollectionNames 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > getChildCollectionNames 3 | 4 | ## Description 5 | Lists the child collections names in the collection. 6 | 7 | ## Syntax 8 | ``` 9 | pv account getChildCollectionNames --collectionName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--collectionName` (string) 14 | This is the unique name of the collection (not the friendly name). 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Account Data Plane > Collections > [List Child Collection Names](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/collections/list-child-collection-names) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/account/collections/{collectionName}/getChildCollectionNames 23 | ``` 24 | 25 | ## Examples 26 | List the child collections beneath a target collection. 27 | ```powershell 28 | pv account getChildCollectionNames --collectionName "esg-26fa7f24-pv" 29 | ``` 30 | 31 |
Sample response. 32 |

33 | 34 | ```json 35 | { 36 | "count": 3, 37 | "value": [ 38 | { 39 | "friendlyName": "Environment", 40 | "name": "g7qe97" 41 | }, 42 | { 43 | "friendlyName": "Social", 44 | "name": "6b93rz" 45 | }, 46 | { 47 | "friendlyName": "Governance", 48 | "name": "bfgnyg" 49 | } 50 | ] 51 | } 52 | ``` 53 |

54 |
-------------------------------------------------------------------------------- /doc/commands/share/getSentShare.md: -------------------------------------------------------------------------------- 1 | # pv share getSentShare 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > getSentShare 4 | 5 | ## Description 6 | 7 | Get a sent share in the given Purview account. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share getSentShare --sentShareName= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | ## Optional Arguments 22 | 23 | *None* 24 | 25 | ## API Mapping 26 | 27 | Share Data Plane > Sent Shares > [Get](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/sent-shares/get) 28 | ``` 29 | GET https://{accountName}.purview.azure.com/share/sentShares/{sentShareName} 30 | ``` 31 | 32 | ## Examples 33 | 34 | Get a sent share. 35 | 36 | ```powershell 37 | pv share getSentShare --sentShareName "NewShare" 38 | ``` 39 | 40 | 41 |
Sample response. 42 |

43 | 44 | ```json 45 | { 46 | "id":"/sentShares/NewShare", 47 | "name":"NewShare", 48 | "properties":{ 49 | "collection":{ 50 | "referenceName":"qrzdyx", 51 | "type":"CollectionReference" 52 | }, 53 | "createdAt":"2022-09-01T16:48:25.0489591Z", 54 | "description":"This is a description.", 55 | "provisioningState":"Succeeded", 56 | "senderEmail":"tarifat@microsoft.com", 57 | "senderName":"Taygan Rifat", 58 | "senderTenantName":"Microsoft" 59 | }, 60 | "shareKind":"InPlace", 61 | "type":"sentShares" 62 | } 63 | ``` 64 |

65 |
66 | -------------------------------------------------------------------------------- /doc/commands/share/rejectReceivedInvitation.md: -------------------------------------------------------------------------------- 1 | # pv share rejectReceivedInvitation 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > rejectReceivedInvitation 4 | 5 | ## Description 6 | 7 | Rejects the received invitation identified by name 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share rejectReceivedInvitation --invitationName= --payloadFile= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--invitationName` (string) 18 | 19 | Name of the invitation. 20 | 21 | `--payloadFile` (string) 22 | 23 | File path to a valid JSON document. 24 | 25 | ## Optional Arguments 26 | 27 | *None* 28 | 29 | ## API Mapping 30 | 31 | Share Data Plane > Received Invitations > [Reject](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/received-invitations/reject) 32 | ``` 33 | POST https://{accountName}.purview.azure.com/share/receivedInvitations/{receivedInvitationName}:reject 34 | ``` 35 | 36 | ## Examples 37 | 38 | Reject a received invitation. 39 | 40 | ```powershell 41 | pv share rejectReceivedInvitation --invitationName "955af42b-b08d-4a00-ba58-aaf31afcd53a" --payloadFile "/path/to/file.json" 42 | ``` 43 | 44 | 45 |
Sample response. 46 |

47 | 48 | ```json 49 | { 50 | "invitationKind": "User", 51 | "properties": { 52 | "targetActiveDirectoryId": "72f988bf-86f1-41af-91ab-2d7cd011db47", 53 | "targetObjectId": "095354ff-cae8-44ff-8120-22ec5a941b40", 54 | "targetEmail": "tarifat@microsoft.com" 55 | } 56 | } 57 | ``` 58 |

59 |
60 | -------------------------------------------------------------------------------- /doc/commands/entity/createOrUpdateCollection.md: -------------------------------------------------------------------------------- 1 | # pv entity createOrUpdateCollection 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > createOrUpdateCollection 3 | 4 | ## Description 5 | 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. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity createOrUpdateCollection --collection= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--collection` (string) 14 | The collection unique name. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Collection > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/collection/create-or-update) 24 | ``` 25 | POST https://{accountName}.purview.azure.com/catalog/api/collections/{collection}/entity 26 | ``` 27 | 28 | ## Examples 29 | Create or update an entity to a collection. 30 | ```powershell 31 | pv entity createOrUpdateCollection --collection "tdumy6" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "referredEntities": {}, 39 | "entity": { 40 | "typeName": "azure_datalake_gen2_path", 41 | "attributes": { 42 | "name": "merged.parquet", 43 | "qualifiedName": "https://pvdemocrv3kadls.dfs.core.windows.net/bing/data/merged.parquet" 44 | } 45 | } 46 | } 47 | ``` 48 |

49 |
-------------------------------------------------------------------------------- /doc/commands/management/setDefaultAccount.md: -------------------------------------------------------------------------------- 1 | # pv management setDefaultAccount 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > setDefaultAccount 3 | 4 | ## Description 5 | Sets the default account for the scope. 6 | 7 | ## Syntax 8 | ``` 9 | pv management setDefaultAccount --subscriptionId= --resourceGroupName= --accountName= --scopeTenantId= --scopeType= --scope= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account. 21 | 22 | `--scopeTenantId` (string) 23 | The tenant ID. 24 | 25 | `--scopeType` (string) 26 | The scope for the default account (Subscription OR Tenant). 27 | 28 | `--scope` (string) 29 | The Id of the scope object, for example if the scope is "Subscription" then it is the ID of that subscription. 30 | 31 | ## Optional Arguments 32 | *None* 33 | 34 | ## API Mapping 35 | Default Accounts > [Set](https://docs.microsoft.com/en-us/rest/api/purview/default-accounts/set) 36 | ``` 37 | POST https://management.azure.com/providers/Microsoft.Purview/setDefaultAccount 38 | ``` 39 | 40 | ## Examples 41 | ```powershell 42 | pv management setDefaultAccount --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "esg" --accountName "esg-26fa7f24-pv" --scopeTenantId "72f988bf-86f1-41af-91ab-2d7cd011db47" --scopeType "Subscription" --scope "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" 43 | ``` -------------------------------------------------------------------------------- /doc/commands/share/createReceivedShare.md: -------------------------------------------------------------------------------- 1 | # pv share createReceivedShare 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > createReceivedShare 4 | 5 | ## Description 6 | 7 | Create a received share in the given account. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share createReceivedShare --receivedShareName= --payloadFile= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--receivedShareName` (string) 18 | 19 | The name of the received share. 20 | 21 | `--payloadFile` (string) 22 | 23 | File path to a valid JSON document. 24 | 25 | ## Optional Arguments 26 | 27 | *None* 28 | 29 | ## API Mapping 30 | 31 | Share Data Plane > Received Shares > [Create](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/received-shares/create) 32 | ``` 33 | PUT https://{accountName}.purview.azure.com/share/receivedShares/{receivedShareName} 34 | ``` 35 | 36 | ## Examples 37 | 38 | Accept a sent share by creating a received share. 39 | 40 | ```powershell 41 | pv share createReceivedShare --receivedShareName "MyNewReceivedShare" --payloadFile "/path/to/file.json" 42 | ``` 43 | 44 | 45 |
Example payload. 46 |

47 | 48 | ```json 49 | { 50 | "properties": { 51 | "sentShareLocation": "northeurope", 52 | "invitationId": "71d43cbe-5e44-40a5-b747-4140752fce62", 53 | "collection": { 54 | "referenceName": "pvdemo52dg4-pv", 55 | "type": "CollectionReference" 56 | } 57 | }, 58 | "shareKind": "InPlace" 59 | } 60 | ``` 61 |

62 |
63 | -------------------------------------------------------------------------------- /samples/json/scan/scan_ruleset.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "AzureStorage", 3 | "scanRulesetType": "Custom", 4 | "properties": { 5 | "scanningRule": { 6 | "fileExtensions": [ 7 | "CSV", 8 | "JSON", 9 | "PSV", 10 | "SSV", 11 | "TSV", 12 | "TXT", 13 | "XML", 14 | "PARQUET" 15 | ], 16 | "customFileExtensions": [ 17 | { 18 | "customFileType": { 19 | "builtInType": null, 20 | "customDelimiter": "$" 21 | }, 22 | "description": "model file type", 23 | "enabled": true, 24 | "fileExtension": ".model" 25 | }, 26 | { 27 | "customFileType": { 28 | "builtInType": "JSON", 29 | "customDelimiter": null 30 | }, 31 | "description": "mdoel1 type", 32 | "enabled": true, 33 | "fileExtension": ".model1" 34 | } 35 | ] 36 | }, 37 | "description": null, 38 | "excludedSystemClassifications": [ 39 | "MICROSOFT.FINANCIAL.AUSTRALIA.BANK_ACCOUNT_NUMBER", 40 | "MICROSOFT.MISCELLANEOUS.IPADDRESS" 41 | ], 42 | "includedCustomClassificationRuleNames": [ 43 | "BF_PII", 44 | "Dummy_Rule2" 45 | ] 46 | } 47 | } -------------------------------------------------------------------------------- /doc/commands/share/reinstateAcceptedShare.md: -------------------------------------------------------------------------------- 1 | # pv share reinstateAcceptedShare 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > reinstateAcceptedShare 4 | 5 | ## Description 6 | 7 | Reinstate a revoked accepted sent share. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share reinstateAcceptedShare --sentShareName= --acceptedSentShareName= --payloadFile= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | `--acceptedSentShareName` (string) 22 | 23 | The name of the accepted sent share. 24 | 25 | `--payloadFile` (string) 26 | 27 | File path to a valid JSON document. 28 | 29 | ## Optional Arguments 30 | 31 | *None* 32 | 33 | ## API Mapping 34 | 35 | Share Data Plane > Accepted Sent Shares > [Reinstate](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/accepted-sent-shares/reinstate) 36 | ``` 37 | POST https://{accountName}.purview.azure.com/share/sentShares/{sentShareName}/acceptedSentShares/{acceptedSentShareName}:reinstate 38 | ``` 39 | 40 | ## Examples 41 | 42 | Reinstate a revoked accepted share. 43 | 44 | ```powershell 45 | pv share reinstateAcceptedShare --sentShareName "MyNewSentShare" --acceptedSentShareName "4f5e1b4b-44f8-42c1-a783-b6c2265e49f5" --payloadFile "/path/to/file.json" 46 | ``` 47 | 48 | 49 |
Example payload. 50 |

51 | 52 | ```json 53 | { 54 | "shareKind": "InPlace", 55 | "properties": { 56 | "expirationDate": "2023-02-24T21:02:24.695Z" 57 | } 58 | } 59 | ``` 60 |

61 |
62 | -------------------------------------------------------------------------------- /doc/commands/glossary/readCategory.md: -------------------------------------------------------------------------------- 1 | # pv glossary readCategory 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > readCategory 3 | 4 | ## Description 5 | Get specific glossary category by its GUID. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary readCategory --categoryGuid= [--limit= --offset= --sort=] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--categoryGuid` (string) 14 | The globally unique identifier of the category. 15 | 16 | ## Optional Arguments 17 | `--limit` (integer) 18 | The page size [default: 1000]. 19 | 20 | `--offset` (integer) 21 | Offset for pagination purpose [default: 0]. 22 | 23 | `--sort` (string) 24 | The sort order - ASC or DESC [default: ASC]. 25 | 26 | ## API Mapping 27 | Catalog Data Plane > Glossary > [Get Glossary Category](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/get-glossary-category) 28 | ``` 29 | GET https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/category/{categoryGuid} 30 | ``` 31 | 32 | ## Examples 33 | ```powershell 34 | pv glossary readCategory --categoryGuid "c856ecef-21e6-4e92-8607-9493d8432e78" 35 | ``` 36 |
Sample response. 37 |

38 | 39 | ```json 40 | { 41 | "anchor": { 42 | "glossaryGuid": "f2307f48-5834-4709-be85-02f3aea5d149", 43 | "relationGuid": "02a36a2f-e240-40ea-b884-c5ec159d5688" 44 | }, 45 | "guid": "c856ecef-21e6-4e92-8607-9493d8432e78", 46 | "lastModifiedTS": "1", 47 | "name": "MyCategory", 48 | "qualifiedName": "MyCategory@Glossary" 49 | } 50 | ``` 51 |

52 |
-------------------------------------------------------------------------------- /doc/commands/scan/readScan.md: -------------------------------------------------------------------------------- 1 | # pv scan readScan 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > readScan 3 | 4 | ## Description 5 | Gets a scan information 6 | 7 | ## Syntax 8 | ``` 9 | pv scan readScan --dataSourceName= --scanName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Scanning Data Plane > Scans > [Get](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scans/get) 24 | ``` 25 | GET https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName} 26 | ``` 27 | 28 | ## Examples 29 | Get a scan by data source name and scan name. 30 | ```powershell 31 | pv scan readScan --dataSourceName "AzureDataLakeStorage-Gbm" --scanName "Scan-Xei" 32 | ``` 33 |
Sample response. 34 |

35 | 36 | ```json 37 | { 38 | "id": "datasources/AzureDataLakeStorage-Gbm/scans/Scan-Xei", 39 | "kind": "AdlsGen2Msi", 40 | "name": "Scan-Xei", 41 | "properties": { 42 | "collection": { 43 | "lastModifiedAt": "2022-02-23T15:45:56.3612911Z", 44 | "referenceName": "esg-26fa7f24-pv", 45 | "type": "CollectionReference" 46 | }, 47 | "createdAt": "2022-02-23T15:45:56.3612911Z", 48 | "lastModifiedAt": "2022-02-23T15:45:56.3612911Z", 49 | "scanRulesetName": "AdlsGen2", 50 | "scanRulesetType": "System" 51 | } 52 | } 53 | ``` 54 |

55 |
-------------------------------------------------------------------------------- /doc/commands/account/getCollection.md: -------------------------------------------------------------------------------- 1 | # pv account getCollection 2 | [Command Reference](../../../README.md#command-reference) > [account](./main.md) > getCollection 3 | 4 | ## Description 5 | Get a collection. 6 | 7 | ## Syntax 8 | ``` 9 | pv account getCollection --collectionName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--collectionName` (string) 14 | This is the unique name of the collection (not the friendly name). 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Account Data Plane > Collections > [Get Collection](https://docs.microsoft.com/en-us/rest/api/purview/accountdataplane/collections/get-collection) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/account/collections/{collectionName} 23 | ``` 24 | 25 | ## Examples 26 | Get a collection by name. 27 | ```powershell 28 | pv account getCollection --collectionName "g7qe97" 29 | ``` 30 | 31 |
Sample response. 32 |

33 | 34 | ```json 35 | { 36 | "collectionProvisioningState": "Succeeded", 37 | "friendlyName": "Environment", 38 | "name": "g7qe97", 39 | "parentCollection": { 40 | "referenceName": "esg-26fa7f24-pv", 41 | "type": "CollectionReference" 42 | }, 43 | "systemData": { 44 | "createdAt": "2022-02-27T12:52:28.8826657Z", 45 | "createdBy": "095354ff-cae8-44ff-8120-22ec5a941b40", 46 | "createdByType": "User", 47 | "lastModifiedAt": "2022-02-27T12:52:28.8826659Z", 48 | "lastModifiedBy": "095354ff-cae8-44ff-8120-22ec5a941b40", 49 | "lastModifiedByType": "User" 50 | } 51 | } 52 | ``` 53 |

54 |
-------------------------------------------------------------------------------- /doc/commands/entity/readClassification.md: -------------------------------------------------------------------------------- 1 | # pv entity readClassification 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > readClassification 3 | 4 | ## Description 5 | Get a classification assigned for a given entity by the entity GUID and classification name. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity readClassification --guid= --classificationName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--guid` (string) 14 | The globally unique identifier of the entity. 15 | 16 | `--classificationName` (string) 17 | The name of the classification. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Entity > [Get Classification](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/get-classification) 24 | ``` 25 | GET https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/guid/{guid}/classification/{classificationName} 26 | ``` 27 | 28 | ## Examples 29 | Get a classification assigned to a particular entity via the entity GUID and classification name. 30 | ```powershell 31 | pv entity readClassification --guid "c6a7811a-0699-44d0-b0be-68babe560ab2" --classificationName "MICROSOFT.GOVERNMENT.AUSTRALIA.COMPANY.NUMBER" 32 | ``` 33 | 34 |
Sample response. 35 |

36 | 37 | ```json 38 | { 39 | "attributes": { 40 | "confidence": null 41 | }, 42 | "entityGuid": "c6a7811a-0699-44d0-b0be-68babe560ab2", 43 | "entityStatus": "ACTIVE", 44 | "lastModifiedTS": "1", 45 | "typeName": "MICROSOFT.GOVERNMENT.AUSTRALIA.COMPANY.NUMBER" 46 | } 47 | ``` 48 |

49 |
-------------------------------------------------------------------------------- /doc/commands/entity/addLabelsByUniqueAttribute.md: -------------------------------------------------------------------------------- 1 | # pv entity addLabelsByUniqueAttribute 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > addLabelsByUniqueAttribute 3 | 4 | ## Description 5 | Append labels to an entity identified by its type and unique attributes. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity addLabelsByUniqueAttribute --typeName= --qualifiedName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--typeName` (string) 14 | The name of the type. 15 | 16 | `--qualifiedName` (string) 17 | The qualified name of the entity. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Add given labels to a given entity identified by its type and unique attributes.](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-labels-by-unique-attribute) 27 | ``` 28 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels 29 | ``` 30 | 31 | ## Examples 32 | Append labels to an existing entity identified by its type and unique attributes. 33 | ```powershell 34 | pv entity addLabelsByUniqueAttribute --typeName "azure_datalake_gen2_resource_set" --qualifiedName "https://STORAGE_ACCOUNT.dfs.core.windows.net/bing/data/{N}/QueriesByCountry_{Year}-{Month}-{Day}_{N}-{N}-{N}.tsv" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | [ 41 | "a", 42 | "b", 43 | "c" 44 | ] 45 | ``` 46 |

47 |
-------------------------------------------------------------------------------- /doc/commands/entity/putUniqueAttributeClassifications.md: -------------------------------------------------------------------------------- 1 | # pv entity putUniqueAttributeClassifications 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > putUniqueAttributeClassifications 3 | 4 | ## Description 5 | Update classification on an entity identified by its type and unique attributes. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity putUniqueAttributeClassifications --typeName= --qualifiedName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--typeName` (string) 14 | The name of the type. 15 | 16 | `--qualifiedName` (string) 17 | The qualified name of the entity. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Update Classifications By Unique Attribute](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/update-classifications-by-unique-attribute) 27 | ``` 28 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/classifications 29 | ``` 30 | 31 | ## Examples 32 | ```powershell 33 | pv entity putUniqueAttributeClassifications --typeName "azure_datalake_gen2_filesystem" --qualifiedName "https://esg26fa7f24adls.dfs.core.windows.net/02-silver" --payloadFile "/path/to/file.json" 34 | ``` 35 |
Example payload. 36 |

37 | 38 | ```json 39 | [ 40 | { 41 | "typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER", 42 | "attributes": { 43 | "confidence": 7 44 | } 45 | } 46 | ] 47 | ``` 48 |

49 |
-------------------------------------------------------------------------------- /doc/commands/entity/deleteLabelsByUniqueAttribute.md: -------------------------------------------------------------------------------- 1 | # pv entity deleteLabelsByUniqueAttribute 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > deleteLabelsByUniqueAttribute 3 | 4 | ## Description 5 | Delete label(s) from an entity identified by its type and unique attributes. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity deleteLabelsByUniqueAttribute --typeName= --qualifiedName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--typeName` (string) 14 | The name of the type. 15 | 16 | `--qualifiedName` (string) 17 | The qualified name of the entity. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Delete given labels to a given entity identified by its type and unique attributes.](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/delete-labels-by-unique-attribute) 27 | ``` 28 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels 29 | ``` 30 | 31 | ## Examples 32 | Delete labels from an existing entity identified by its type and unique attributes. 33 | ```powershell 34 | pv entity deleteLabelsByUniqueAttribute --typeName "azure_datalake_gen2_resource_set" --qualifiedName "https://STORAGE_ACCOUNT.dfs.core.windows.net/bing/data/{N}/QueriesByCountry_{Year}-{Month}-{Day}_{N}-{N}-{N}.tsv" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | [ 41 | "a", 42 | "c" 43 | ] 44 | ``` 45 |

46 |
-------------------------------------------------------------------------------- /doc/commands/entity/setLabelsByUniqueAttribute.md: -------------------------------------------------------------------------------- 1 | # pv entity setLabelsByUniqueAttribute 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > setLabelsByUniqueAttribute 3 | 4 | ## Description 5 | Overwrite labels for an entity identified by its type and unique attributes. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity setLabelsByUniqueAttribute --typeName= --qualifiedName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--typeName` (string) 14 | The name of the type. 15 | 16 | `--qualifiedName` (string) 17 | The qualified name of the entity. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Set labels to a given entity identified by its type and unique attributes.](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/set-labels-by-unique-attribute) 27 | ``` 28 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/labels 29 | ``` 30 | 31 | ## Examples 32 | Overwrite labels property for an existing entity identified by its type and unique attributes. 33 | ```powershell 34 | pv entity setLabelsByUniqueAttribute --typeName "azure_datalake_gen2_resource_set" --qualifiedName "https://STORAGE_ACCOUNT.dfs.core.windows.net/bing/data/{N}/QueriesByCountry_{Year}-{Month}-{Day}_{N}-{N}-{N}.tsv" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | [ 41 | "a", 42 | "b", 43 | "c" 44 | ] 45 | ``` 46 |

47 |
-------------------------------------------------------------------------------- /doc/commands/management/putPrivateEndpoint.md: -------------------------------------------------------------------------------- 1 | # pv management putPrivateEndpoint 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > putPrivateEndpoint 3 | 4 | ## Description 5 | Approves/Rejects private endpoint connection request. 6 | 7 | ## Syntax 8 | ``` 9 | pv management putPrivateEndpoint --subscriptionId= --resourceGroupName= --accountName= --privateEndpointConnectionName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account 21 | 22 | `--privateEndpointConnectionName` (string) 23 | Name of the private endpoint connection. 24 | 25 | `--payloadFile` (string) 26 | File path to a valid JSON document. 27 | 28 | ## Optional Arguments 29 | *None* 30 | 31 | ## API Mapping 32 | Private Endpoint Connections > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/private-endpoint-connections/create-or-update) 33 | ``` 34 | PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName} 35 | ``` 36 | 37 | ## Examples 38 | ```powershell 39 | pv management deletePrivateEndpoint --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "private" --accountName "taygan-private-pv" --privateEndpointConnectionName "purview-pe-instance-a2dbee21-876d-43a4-b521-df9863a98553" --payloadFile "/path/to/file.json" 40 | ``` -------------------------------------------------------------------------------- /doc/commands/scan/tagClassificationVersion.md: -------------------------------------------------------------------------------- 1 | # pv scan tagClassificationVersion 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > tagClassificationVersion 3 | 4 | ## Description 5 | Sets Classification Action on a specific classification rule version. 6 | 7 | ## Syntax 8 | ``` 9 | pv scan tagClassificationVersion --classificationRuleName= --classificationRuleVersion= --action= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--classificationRuleName` (string) 14 | The name of the classification rule. 15 | 16 | `--classificationRuleVersion` (integer) 17 | The classification rule version number. 18 | 19 | `--action` (string) 20 | The classification action (Keep or Delete). 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Scanning Data Plane > Classification Rules > [Tag Classification Version](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/classification-rules/tag-classification-version) 27 | ``` 28 | POST https://{accountName}.purview.azure.com/scan/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag 29 | ``` 30 | 31 | ## Examples 32 | Set classification action to Keep on a specific classification rule version. 33 | ```powershell 34 | pv scan tagClassificationVersion --classificationRuleName "twitter_handle_rule" --classificationRuleVersion 1 --action "Keep" 35 | ``` 36 | 37 | Set classification action to Delete on a specific classification rule version. 38 | ```powershell 39 | pv scan tagClassificationVersion --classificationRuleName "twitter_handle_rule" --classificationRuleVersion 1 --action "Delete" 40 | ``` -------------------------------------------------------------------------------- /doc/commands/management/listKeys.md: -------------------------------------------------------------------------------- 1 | # pv management listKeys 2 | [Command Reference](../../../README.md#command-reference) > [management](./main.md) > listKeys 3 | 4 | ## Description 5 | Lists the keys asynchronous. 6 | 7 | ## Syntax 8 | ``` 9 | pv management listKeys --subscriptionId= --resourceGroupName= --accountName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--subscriptionId` (string) 14 | The subscription identifier. 15 | 16 | `--resourceGroupName` (string) 17 | The resource group name. 18 | 19 | `--accountName` (string) 20 | The name of the account. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Accounts > [List Keys](https://docs.microsoft.com/en-us/rest/api/purview/accounts/list-keys) 27 | ``` 28 | POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Purview/accounts/{accountName}/listkeys 29 | ``` 30 | 31 | ## Examples 32 | List the keys associated to an existing Azure Purview account. 33 | ```powershell 34 | pv management listKeys --subscriptionId "2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0" --resourceGroupName "myrg" --accountName "my-purview-account" 35 | ``` 36 | 37 |
Sample response. 38 |

39 | 40 | ```json 41 | { 42 | "atlasKafkaPrimaryEndpoint": "Endpoint=sb://ATLAS_ENDPOINT.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=YOUR_SHARED_ACCESS_KEY", 43 | "atlasKafkaSecondaryEndpoint": "Endpoint=sb://ATLAS_ENDPOINT.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAccessKey=YOUR_SHARED_ACCESS_KEY" 44 | } 45 | ``` 46 |

47 |
-------------------------------------------------------------------------------- /doc/commands/scan/putFilter.md: -------------------------------------------------------------------------------- 1 | # pv scan putFilter 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > putFilter 3 | 4 | ## Description 5 | Creates or updates a filter. 6 | 7 | ## Syntax 8 | ``` 9 | pv scan putFilter --dataSourceName= --scanName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Scanning Data Plane > Filters > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/filters/create-or-update) 27 | ``` 28 | PUT https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName}/filters/custom 29 | ``` 30 | 31 | ## Examples 32 | Create or update a scan filter. 33 | ```powershell 34 | pv scan putFilter --dataSourceName "AzureDataLakeStorage-EqK" --scanName "Scan-Qrh" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | { 41 | "name": "custom", 42 | "properties": { 43 | "excludeUriPrefixes": [ 44 | "https://pvlab4da424adls.dfs.core.windows.net/raw/BingCoronavirusQuerySet" 45 | ], 46 | "includeUriPrefixes": [ 47 | "https://pvlab4da424adls.dfs.core.windows.net/", 48 | "https://pvlab4da424adls.dfs.core.windows.net/raw", 49 | "https://pvlab4da424adls.dfs.core.windows.net/raw/Twitter" 50 | ] 51 | } 52 | } 53 | ``` 54 |

55 |
-------------------------------------------------------------------------------- /doc/commands/share/updateExpirationAcceptedShare.md: -------------------------------------------------------------------------------- 1 | # pv share updateExpirationAcceptedShare 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > updateExpirationAcceptedShare 4 | 5 | ## Description 6 | 7 | Update the expiration date of an active accepted sent share. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share updateExpirationAcceptedShare --sentShareName= --acceptedSentShareName= --payloadFile= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | `--acceptedSentShareName` (string) 22 | 23 | The name of the accepted sent share. 24 | 25 | `--payloadFile` (string) 26 | 27 | File path to a valid JSON document. 28 | 29 | ## Optional Arguments 30 | 31 | *None* 32 | 33 | ## API Mapping 34 | 35 | Share Data Plane > Accepted Sent Shares > [Update Expiration](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/accepted-sent-shares/update-expiration) 36 | ``` 37 | POST https://{accountName}.purview.azure.com/share/sentShares/{sentShareName}/acceptedSentShares/{acceptedSentShareName}:update-expiration 38 | ``` 39 | 40 | ## Examples 41 | 42 | Update the expiration date of an accepted share. 43 | 44 | ```powershell 45 | pv share updateExpirationAcceptedShare --sentShareName "MyNewSentShare" --acceptedSentShareName "4f5e1b4b-44f8-42c1-a783-b6c2265e49f5" --payloadFile "/path/to/file.json" 46 | ``` 47 | 48 | 49 |
Example payload. 50 |

51 | 52 | ```json 53 | { 54 | "shareKind": "InPlace", 55 | "properties": { 56 | "expirationDate": "2023-02-24T21:02:24.695Z" 57 | } 58 | } 59 | ``` 60 |

61 |
62 | -------------------------------------------------------------------------------- /purviewcli/client/_insight.py: -------------------------------------------------------------------------------- 1 | from .endpoint import Endpoint, decorator, get_json 2 | from datetime import datetime, timedelta 3 | 4 | class Insight(Endpoint): 5 | def __init__(self): 6 | Endpoint.__init__(self) 7 | self.app = 'mapanddiscover' 8 | 9 | # Asset 10 | @decorator 11 | def insightAssetDistribution(self, args): 12 | self.method = 'GET' 13 | self.endpoint = '/reports/serverless/asset2/assetDistribution/getSnapshot' 14 | 15 | @decorator 16 | def insightFilesWithoutResourceSet(self, args): 17 | self.method = 'GET' 18 | self.endpoint = '/reports/serverless/asset2/filesWithoutResourceSet/getSnapshot' 19 | 20 | @decorator 21 | def insightFilesAggregation(self, args): 22 | self.method = 'GET' 23 | self.endpoint = '/reports/serverless/asset2/filesAggregation/getSnapshot' 24 | 25 | @decorator 26 | def insightTags(self, args): 27 | self.method = 'GET' 28 | self.endpoint = '/reports/serverless/asset2/tags/getSnapshot' 29 | 30 | @decorator 31 | def insightTagsTimeSeries(self, args): 32 | self.method = 'GET' 33 | self.endpoint = '/reports/serverless/asset2/tags/timeSeries' 34 | 35 | # Scan 36 | @decorator 37 | def insightScanStatusSummary(self, args): 38 | self.method = 'GET' 39 | self.endpoint = '/reports/scanstatus2/summaries' 40 | self.params = { 'window': args['--numberOfDays'] } 41 | 42 | @decorator 43 | def insightScanStatusSummaryByTs(self, args): 44 | self.method = 'GET' 45 | self.endpoint = '/reports/scanstatus2/summariesbyts' 46 | self.params = { 'window': args['--numberOfDays'] } -------------------------------------------------------------------------------- /doc/commands/glossary/putCategory.md: -------------------------------------------------------------------------------- 1 | # pv glossary putCategory 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > putCategory 3 | 4 | ## Description 5 | Update the given glossary category by its GUID. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary putCategory --categoryGuid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--categoryGuid` (string) 14 | The globally unique identifier of the category. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Glossary > [Update Glossary Category](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/update-glossary-category) 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/category/{categoryGuid} 26 | ``` 27 | 28 | ## Examples 29 | Update an existing category. 30 | ```powershell 31 | pv glossary putCategory --categoryGuid "c856ecef-21e6-4e92-8607-9493d8432e78" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "anchor": { 39 | "glossaryGuid": "f2307f48-5834-4709-be85-02f3aea5d149" 40 | }, 41 | "guid": "c856ecef-21e6-4e92-8607-9493d8432e78", 42 | "name": "MyCategory", 43 | "terms": [ 44 | { 45 | "termGuid": "d99523b1-9b89-4748-8455-c00d76fd823a" 46 | }, 47 | { 48 | "termGuid": "06276c6f-aab7-46f3-980c-e92ad541f333" 49 | }, 50 | { 51 | "termGuid": "2796d276-75a0-46c0-9920-1d9e75c25842" 52 | } 53 | ] 54 | } 55 | ``` 56 |

57 |
-------------------------------------------------------------------------------- /doc/commands/scan/readSystemScanRuleset.md: -------------------------------------------------------------------------------- 1 | # pv scan readSystemScanRuleset 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > readSystemScanRuleset 3 | 4 | ## Description 5 | Get a system scan ruleset for a data source. 6 | 7 | ## Syntax 8 | ``` 9 | pv scan readSystemScanRuleset --dataSourceType= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceType` (string) 14 | A valid data source type. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Scanning Data Plane > System Scan Rulesets > [Get](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/system-scan-rulesets/get) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/scan/systemScanRulesets/datasources/{dataSourceType} 23 | ``` 24 | 25 | ## Examples 26 | Get a system scan ruleset by data source type. 27 | ```powershell 28 | pv scan readSystemScanRuleset --dataSourceType "AmazonMySql" 29 | ``` 30 |
Sample response. 31 |

32 | 33 | ```json 34 | { 35 | "id": "systemscanrulesets/AmazonMySql", 36 | "kind": "AmazonMySql", 37 | "name": "AmazonMySql", 38 | "properties": { 39 | "collection": null, 40 | "createdAt": "2021-12-02T09:24:49.8617837Z", 41 | "description": "Microsoft default scan rule set that includes all supported system classification rules", 42 | "excludedSystemClassifications": [], 43 | "includedCustomClassificationRuleNames": [], 44 | "lastModifiedAt": "2021-12-02T09:24:49.8617837Z", 45 | "temporaryResourceFilters": null 46 | }, 47 | "scanRulesetType": "System", 48 | "status": "Enabled", 49 | "version": 3 50 | } 51 | ``` 52 |

53 |
-------------------------------------------------------------------------------- /doc/commands/account/main.md: -------------------------------------------------------------------------------- 1 | # Account 2 | [Command Reference](../../../README.md#command-reference) > account 3 | 4 | ## Account 5 | | Command | Description | 6 | | --- | --- | 7 | | [pv account getAccount](./getAccount.md) | Get an account. | 8 | | [pv account updateAccount](./updateAccount.md) | Updates an account. | 9 | | [pv account getAccessKeys](./getAccessKeys.md) | List the authorization keys associated with this account. | 10 | | [pv account regenerateAccessKeys](./regenerateAccessKeys.md) | Regenerate the authorization keys associated with this data catalog. | 11 | 12 | ## Collection 13 | | Command | Description | 14 | | --- | --- | 15 | | [pv account deleteCollection](./deleteCollection.md) | Delete a collection. | 16 | | [pv account getChildCollectionNames](./getChildCollectionNames.md) | Lists the child collections names in the collection. | 17 | | [pv account getCollection](./getCollection.md) | Get a collection. | 18 | | [pv account getCollectionPath](./getCollectionPath.md) | Gets the parent name and parent friendly name chains that represent the collection path. | 19 | | [pv account getCollections](./getCollections.md) | List the collections in the account. | 20 | | [pv account putCollection](./putCollection.md) | Creates or updates a collection entity. | 21 | 22 | ## Resource Set Rule 23 | | Command | Description | 24 | | --- | --- | 25 | | [pv account getResourceSetRule](./getResourceSetRule.md) | Get a resource set. | 26 | | [pv account getResourceSetRules](./getResourceSetRules.md) | List all resource sets. | 27 | | [pv account putResourceSetRule](./putResourceSetRule.md) | Creates or updates a resource set. | 28 | | [pv account deleteResourceSetRule](./deleteResourceSetRule.md) | Delete a resource set. | -------------------------------------------------------------------------------- /doc/commands/scan/putScanRuleset.md: -------------------------------------------------------------------------------- 1 | # pv scan putScanRuleset 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > putScanRuleset 3 | 4 | ## Description 5 | Creates or Updates a scan ruleset 6 | 7 | ## Syntax 8 | ``` 9 | pv scan putScanRuleset --scanRulesetName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--scanRulesetName` (string) 14 | The ruleset name. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Scanning Data Plane > Scan Rulesets > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/scan-rulesets/create-or-update) 24 | ``` 25 | PUT https://{accountName}.purview.azure.com/scan/scanrulesets/{scanRulesetName} 26 | ``` 27 | 28 | ## Examples 29 | Create a scan ruleset. 30 | ```powershell 31 | pv scan putScanRuleset --scanRulesetName "my_ruleset" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | { 38 | "kind": "AdlsGen2", 39 | "name": "my_ruleset", 40 | "properties": { 41 | "excludedSystemClassifications": [ 42 | "MICROSOFT.GOVERNMENT.CYPRUS.TAX.IDENTIFICATION.NUMBER", 43 | "MICROSOFT.GOVERNMENT.CHILE.CDI_NUMBER", 44 | "MICROSOFT.GOVERNMENT.MALTA.DRIVERS.LICENSE.NUMBER" 45 | ], 46 | "includedCustomClassificationRuleNames": [], 47 | "scanningRule": { 48 | "customFileExtensions": null, 49 | "fileExtensions": [ 50 | "PARQUET" 51 | ] 52 | } 53 | }, 54 | "scanRulesetType": "Custom" 55 | } 56 | ``` 57 |

58 |
-------------------------------------------------------------------------------- /doc/commands/share/listReceivedAssets.md: -------------------------------------------------------------------------------- 1 | # pv share listReceivedAssets 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > listReceivedAssets 4 | 5 | ## Description 6 | 7 | List source asset of a received share. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share listReceivedAssets --receivedShareName= [--skipToken=] 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--receivedShareName` (string) 18 | 19 | The name of the received share. 20 | 21 | ## Optional Arguments 22 | 23 | `--skipToken` (string) 24 | 25 | The continuation token to list the next page. 26 | 27 | ## API Mapping 28 | 29 | Share Data Plane > Received Assets > [List](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/received-assets/list) 30 | ``` 31 | GET https://{accountName}.purview.azure.com/share/receivedShares/{receivedShareName}/receivedAssets 32 | ``` 33 | 34 | ## Examples 35 | 36 | Get a list of received assets from a particular received share. 37 | 38 | ```powershell 39 | pv share listReceivedAssets --receivedShareName "NewShare" 40 | ``` 41 | 42 | 43 |
Sample response. 44 |

45 | 46 | ```json 47 | { 48 | "value":[ 49 | { 50 | "id":"/receivedShares/NewShare/receivedAssets/6408e9cb-273a-49c7-8e2d-c89e928fd197", 51 | "kind":"BlobAccount", 52 | "name":"6408e9cb-273a-49c7-8e2d-c89e928fd197", 53 | "properties":{ 54 | "location":"uksouth", 55 | "receiverAssetName":"assetName", 56 | "receiverPaths":[ 57 | "products.csv" 58 | ] 59 | }, 60 | "type":"receivedShares/receivedAssets" 61 | } 62 | ] 63 | } 64 | ``` 65 |

66 |
67 | -------------------------------------------------------------------------------- /doc/commands/share/createSentInvitation.md: -------------------------------------------------------------------------------- 1 | # pv share createSentInvitation 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > createSentInvitation 4 | 5 | ## Description 6 | 7 | Create/Update a sent share invitation in the given account. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share createSentInvitation --sentShareName= --invitationName= --payloadFile= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | `--invitationName` (string) 22 | 23 | Name of the invitation. 24 | 25 | `--payloadFile` (string) 26 | 27 | File path to a valid JSON document. 28 | 29 | ## Optional Arguments 30 | 31 | *None* 32 | 33 | ## API Mapping 34 | 35 | Share Data Plane > Sent Share Invitations > [Create Or Update](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/sent-share-invitations/create-or-update) 36 | ``` 37 | PUT https://{accountName}.purview.azure.com/share/sentShares/{sentShareName}/sentShareInvitations/{sentShareInvitationName} 38 | ``` 39 | 40 | ## Examples 41 | 42 | Create a sent invitation from a sent share. 43 | 44 | ```powershell 45 | pv share createSentInvitation --sentShareName "MyNewSentShare" --invitationName "650f1292-9c84-44c9-9339-342b88940dbc" --payloadFile "/path/to/file.json" 46 | ``` 47 | 48 | 49 |
Example payload. 50 |

51 | 52 | ```json 53 | { 54 | "invitationKind": "User", 55 | "properties": { 56 | "targetActiveDirectoryId": "72f988bf-86f1-41af-91ab-2d7cd011db47", 57 | "targetObjectId": "095354ff-cae8-44ff-8120-22ec5a941b40", 58 | "targetEmail": "tarifat@microsoft.com" 59 | } 60 | } 61 | ``` 62 |

63 |
64 | -------------------------------------------------------------------------------- /purviewcli/client/endpoint.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import json 3 | from .client import PurviewClient 4 | 5 | class Endpoint: 6 | def __init__(self): 7 | self.app = None 8 | self.method = None 9 | self.endpoint = None 10 | self.params = None 11 | self.payload = None 12 | self.files = None 13 | self.headers = {} 14 | 15 | def get_data(http_dict): 16 | client = PurviewClient() 17 | client.set_region(http_dict['app']) 18 | client.set_account(http_dict['app']) 19 | client.set_token(http_dict['app']) 20 | data = client.http_get(http_dict['app'], http_dict['method'], http_dict['endpoint'], http_dict['params'], http_dict['payload'], http_dict['files'], http_dict['headers']) 21 | return data 22 | 23 | def get_json(args, param): 24 | response = None 25 | if args[param] is not None: 26 | filepath = args[param] 27 | if '.JSON' in filepath.upper(): 28 | try: 29 | with open(filepath, encoding='utf-8') as f: 30 | response = json.load(f) 31 | except: 32 | with open(filepath, encoding='utf-16') as f: 33 | response = json.load(f) 34 | else: 35 | print('[ERROR] The {0} parameter must contain a valid file path to a JSON document.'.format(param)) 36 | sys.exit() 37 | return response 38 | 39 | def decorator(func): 40 | def wrapper(self, args): 41 | func(self, args) 42 | http_dict = {'app': self.app, 'method': self.method, 'endpoint': self.endpoint, 'params': self.params, 'payload': self.payload, 'files': self.files, 'headers': self.headers} 43 | data = get_data(http_dict) 44 | return data 45 | return wrapper 46 | -------------------------------------------------------------------------------- /doc/commands/entity/createUniqueAttributeClassifications.md: -------------------------------------------------------------------------------- 1 | # pv entity createUniqueAttributeClassifications 2 | [Command Reference](../../../README.md#command-reference) > [entity](./main.md) > createUniqueAttributeClassifications 3 | 4 | ## Description 5 | Add classification to the entity identified by its type and unique attributes. 6 | 7 | ## Syntax 8 | ``` 9 | pv entity createUniqueAttributeClassifications --typeName= --qualifiedName= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--typeName` (string) 14 | The name of the type. 15 | 16 | `--qualifiedName` (string) 17 | The qualified name of the entity. 18 | 19 | `--payloadFile` (string) 20 | File path to a valid JSON document. 21 | 22 | ## Optional Arguments 23 | *None* 24 | 25 | ## API Mapping 26 | Catalog Data Plane > Entity > [Add Classifications By Unique Attribute](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-classifications-by-unique-attribute) 27 | ``` 28 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/entity/uniqueAttribute/type/{typeName}/classifications 29 | ``` 30 | 31 | ## Examples 32 | Associate an entity to multiple classifications via a unique attribute (e.g. qualifiedName). 33 | ```powershell 34 | pv entity createUniqueAttributeClassifications --typeName "azure_datalake_gen2_filesystem" --qualifiedName "https://esg26fa7f24adls.dfs.core.windows.net/02-silver" --payloadFile "/path/to/file.json" 35 | ``` 36 |
Example payload. 37 |

38 | 39 | ```json 40 | [ 41 | { 42 | "typeName": "MICROSOFT.FINANCIAL.US.ABA_ROUTING_NUMBER" 43 | }, 44 | { 45 | "typeName": "MICROSOFT.FINANCIAL.CREDIT_CARD_NUMBER" 46 | } 47 | ] 48 | ``` 49 |

50 |
-------------------------------------------------------------------------------- /doc/commands/scan/readFilters.md: -------------------------------------------------------------------------------- 1 | # pv scan readFilters 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > readFilters 3 | 4 | ## Description 5 | Get a filter 6 | 7 | ## Syntax 8 | ``` 9 | pv scan readFilters --dataSourceName= --scanName= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceName` (string) 14 | The data source name. 15 | 16 | `--scanName` (string) 17 | The scan name. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Scanning Data Plane > Filters > [Get](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/filters/get) 24 | ``` 25 | GET https://{accountName}.purview.azure.com/scan/datasources/{dataSourceName}/scans/{scanName}/filters/custom 26 | ``` 27 | 28 | ## Examples 29 | Get scan filters (scope) by data source name and scan name. 30 | ```powershell 31 | pv scan readFilters --dataSourceName "AzureDataLakeStorage-Gbm" --scanName "Scan-5Jc" 32 | ``` 33 |
Sample response. 34 |

35 | 36 | ```json 37 | { 38 | "id": "datasources/AzureDataLakeStorage-Gbm/scans/Scan-5Jc/filters/custom", 39 | "name": "custom", 40 | "properties": { 41 | "excludeRegexes": null, 42 | "excludeUriPrefixes": [ 43 | "https://esg26fa7f24adls.dfs.core.windows.net/01-bronze", 44 | "https://esg26fa7f24adls.dfs.core.windows.net/02-silver", 45 | "https://esg26fa7f24adls.dfs.core.windows.net/esg26fa7f24fs" 46 | ], 47 | "includeRegexes": null, 48 | "includeUriPrefixes": [ 49 | "https://esg26fa7f24adls.dfs.core.windows.net/", 50 | "https://esg26fa7f24adls.dfs.core.windows.net/03-gold" 51 | ] 52 | } 53 | } 54 | ``` 55 |

56 |
-------------------------------------------------------------------------------- /doc/commands/types/createTypeDefs.md: -------------------------------------------------------------------------------- 1 | # pv types createTypeDefs 2 | [Command Reference](../../../README.md#command-reference) > [types](./main.md) > createTypeDefs 3 | 4 | ## Description 5 | Create all atlas type definitions in bulk, only new definitions will be created. Any changes to the existing definitions will be discarded. 6 | 7 | ## Syntax 8 | ``` 9 | pv types createTypeDefs --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--payloadFile` (string) 14 | File path to a valid JSON document. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Catalog Data Plane > Types > [Create Type Definitions](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/types/create-type-definitions) 21 | ``` 22 | POST https://{accountName}.purview.azure.com/catalog/api/atlas/v2/types/typedefs 23 | ``` 24 | 25 | ## Examples 26 | Create type definitions in bulk. 27 | ```powershell 28 | pv types createTypeDefs --payloadFile "/path/to/file.json" 29 | ``` 30 | 31 |
Example payload. 32 |

33 | 34 | ```json 35 | { 36 | "classificationDefs": [ 37 | { 38 | "category": "CLASSIFICATION", 39 | "name": "CUSTOM.PII.PATIENT.IDENTITY.CARD", 40 | "options": { 41 | "displayName": "Patient Identity Card Number" 42 | } 43 | }, 44 | { 45 | "category": "CLASSIFICATION", 46 | "name": "CUSTOM.PII.PATIENT.POLICY.NUMBER", 47 | "options": { 48 | "displayName": "Patient Policy Number" 49 | } 50 | } 51 | ], 52 | "entityDefs": [], 53 | "enumDefs": [], 54 | "relationshipDefs": [], 55 | "structDefs": [] 56 | } 57 | ``` 58 |

59 |
-------------------------------------------------------------------------------- /doc/commands/scan/readSystemScanRulesetLatest.md: -------------------------------------------------------------------------------- 1 | # pv scan readSystemScanRulesetLatest 2 | [Command Reference](../../../README.md#command-reference) > [scan](./main.md) > readSystemScanRulesetLatest 3 | 4 | ## Description 5 | Get the latest version of a system scan ruleset 6 | 7 | ## Syntax 8 | ``` 9 | pv scan readSystemScanRulesetLatest --dataSourceType= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--dataSourceType` (string) 14 | A valid data source type. 15 | 16 | ## Optional Arguments 17 | *None* 18 | 19 | ## API Mapping 20 | Scanning Data Plane > System Scan Rulesets > [Get Latest](https://docs.microsoft.com/en-us/rest/api/purview/scanningdataplane/system-scan-rulesets/get-latest) 21 | ``` 22 | GET https://{accountName}.purview.azure.com/scan/systemScanRulesets/versions/latest 23 | ``` 24 | 25 | ## Examples 26 | Get the latest version of a system scan ruleset by data source type. 27 | ```powershell 28 | pv scan readSystemScanRulesetLatest --dataSourceType "AmazonMySql" 29 | ``` 30 |
Sample response. 31 |

32 | 33 | ```json 34 | { 35 | "id": "systemscanrulesets/AmazonMySql", 36 | "kind": "AmazonMySql", 37 | "name": "AmazonMySql", 38 | "properties": { 39 | "collection": null, 40 | "createdAt": "2021-12-02T09:24:49.8617837Z", 41 | "description": "Microsoft default scan rule set that includes all supported system classification rules", 42 | "excludedSystemClassifications": [], 43 | "includedCustomClassificationRuleNames": [], 44 | "lastModifiedAt": "2021-12-02T09:24:49.8617837Z", 45 | "temporaryResourceFilters": null 46 | }, 47 | "scanRulesetType": "System", 48 | "status": "Enabled", 49 | "version": 3 50 | } 51 | ``` 52 |

53 |
-------------------------------------------------------------------------------- /doc/commands/glossary/readCategoriesHeaders.md: -------------------------------------------------------------------------------- 1 | # pv glossary readCategoriesHeaders 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > readCategoriesHeaders 3 | 4 | ## Description 5 | Get the category headers belonging to a specific glossary. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary readCategoriesHeaders --glossaryGuid= [--limit= --offset= --sort=] 10 | ``` 11 | 12 | ## Required Arguments 13 | `--glossaryGuid` (string) 14 | The globally unique identifier for glossary. 15 | 16 | ## Optional Arguments 17 | `--limit` (integer) 18 | The page size [default: 1000]. 19 | 20 | `--offset` (integer) 21 | Offset for pagination purpose [default: 0]. 22 | 23 | `--sort` (string) 24 | The sort order - ASC or DESC [default: ASC]. 25 | 26 | ## API Mapping 27 | Catalog Data Plane > Glossary > [List Glossary Categories Headers](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/list-glossary-categories-headers) 28 | ``` 29 | GET https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/{glossaryGuid}/categories/headers 30 | ``` 31 | 32 | ## Examples 33 | ```powershell 34 | pv glossary readCategoriesHeaders --glossaryGuid "f2307f48-5834-4709-be85-02f3aea5d149" 35 | ``` 36 |
Sample response. 37 |

38 | 39 | ```json 40 | [ 41 | { 42 | "categoryGuid": "5a5a79b4-52eb-4540-ba1a-001458e5d257", 43 | "displayText": "Category1", 44 | "relationGuid": "20f62759-22e8-4acf-8757-1da8f12d8eb3" 45 | }, 46 | { 47 | "categoryGuid": "c856ecef-21e6-4e92-8607-9493d8432e78", 48 | "displayText": "MyCategory", 49 | "relationGuid": "02a36a2f-e240-40ea-b884-c5ec159d5688" 50 | } 51 | ] 52 | ``` 53 |

54 |

-------------------------------------------------------------------------------- /doc/commands/share/getAsset.md: -------------------------------------------------------------------------------- 1 | # pv share getAsset 2 | 3 | [Command Reference](../../../README.md#command-reference) > [share](./main.md) > getAsset 4 | 5 | ## Description 6 | 7 | Get asset in a sentShare. 8 | 9 | ## Syntax 10 | 11 | ``` 12 | pv share getAsset --sentShareName= --assetName= 13 | ``` 14 | 15 | ## Required Arguments 16 | 17 | `--sentShareName` (string) 18 | 19 | The name of the sent share. 20 | 21 | `--assetName` (string) 22 | 23 | The name of the asset. 24 | 25 | ## Optional Arguments 26 | 27 | *None* 28 | 29 | ## API Mapping 30 | 31 | Share Data Plane > Assets > [Get](https://docs.microsoft.com/en-us/rest/api/purview/sharedataplane/assets/get) 32 | ``` 33 | GET https://{accountName}.purview.azure.com/share/sentShares/{sentShareName}/assets/{assetName} 34 | ``` 35 | 36 | ## Examples 37 | 38 | Get asset from a sent share. 39 | 40 | ```powershell 41 | pv share getAsset --sentShareName "NewShare" --assetName "assetName" 42 | ``` 43 | 44 | 45 |
Sample response. 46 |

47 | 48 | ```json 49 | { 50 | "id":"/sentShares/NewShare/assets/assetName", 51 | "kind":"BlobAccount", 52 | "name":"assetName", 53 | "properties":{ 54 | "location":"uksouth", 55 | "paths":[ 56 | { 57 | "containerName":"products", 58 | "receiverPath":"products.csv", 59 | "senderPath":"products.csv" 60 | } 61 | ], 62 | "provisioningState":"Succeeded", 63 | "receiverAssetName":"assetName", 64 | "storageAccountResourceId":"/subscriptions/2c334b6c-e556-40ac-a4c0-c0d1d2e08ca0/resourceGroups/pv-7643-rg/providers/Microsoft.Storage/storageAccounts/storagedatashare01" 65 | }, 66 | "type":"sentShares/assets" 67 | } 68 | ``` 69 |

70 |
71 | -------------------------------------------------------------------------------- /doc/commands/glossary/deleteTermsAssignedEntities.md: -------------------------------------------------------------------------------- 1 | # pv glossary deleteTermsAssignedEntities 2 | [Command Reference](../../../README.md#command-reference) > [glossary](./main.md) > deleteTermsAssignedEntities 3 | 4 | ## Description 5 | Delete the term assignment for the given list of related objects. 6 | 7 | ## Syntax 8 | ``` 9 | pv glossary deleteTermsAssignedEntities --termGuid= --payloadFile= 10 | ``` 11 | 12 | ## Required Arguments 13 | `--termGuid` (string) 14 | The globally unique identifier for glossary term. 15 | 16 | `--payloadFile` (string) 17 | File path to a valid JSON document. 18 | 19 | ## Optional Arguments 20 | *None* 21 | 22 | ## API Mapping 23 | Catalog Data Plane > Glossary > [Delete Term Assignment From Entities](https://docs.microsoft.com/en-us/rest/api/purview/catalogdataplane/glossary/delete-term-assignment-from-entities) 24 | ``` 25 | DELETE https://{accountName}.purview.azure.com/catalog/api/atlas/v2/glossary/terms/{termGuid}/assignedEntities 26 | ``` 27 | 28 | ## Examples 29 | Remove term assignments in bulk. 30 | ```powershell 31 | pv glossary deleteTermsAssignedEntities --termGuid "bcf9fa54-9c28-4e8d-8775-ccb60785aab9" --payloadFile "/path/to/file.json" 32 | ``` 33 |
Example payload. 34 |

35 | 36 | ```json 37 | [ 38 | { 39 | "guid": "9759ea81-bb37-48ee-8099-02e452ccc57d", 40 | "relationshipGuid": "cecdb42a-bfa5-4576-a883-ccf40b219672" 41 | }, 42 | { 43 | "guid": "6374e9e8-4719-4747-b2d2-054548023ae2", 44 | "relationshipGuid": "784ab0f6-e2eb-4dd6-a4b8-83d78b6504b7" 45 | }, 46 | { 47 | "guid": "dcd41879-dda2-4b3c-8c97-9b76d39799b1", 48 | "relationshipGuid": "ff69eb83-dec3-491b-b7ec-4dcb303652a1" 49 | } 50 | ] 51 | ``` 52 |

53 |
--------------------------------------------------------------------------------