Skip to content

Commit

Permalink
purview admin (#24347)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Oct 21, 2021
1 parent ddb6524 commit fcfd296
Show file tree
Hide file tree
Showing 41 changed files with 11,068 additions and 0 deletions.
1 change: 1 addition & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ com.azure:azure-ai-textanalytics;5.1.3;5.2.0-beta.2
com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-analytics-purview-catalog;1.0.0-beta.2;1.0.0-beta.2
com.azure:azure-analytics-purview-scanning;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-analytics-purview-administration;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-analytics-synapse-accesscontrol;1.0.0-beta.4;1.0.0-beta.5
com.azure:azure-analytics-synapse-artifacts;1.0.0-beta.6;1.0.0-beta.7
com.azure:azure-analytics-synapse-spark;1.0.0-beta.5;1.0.0-beta.6
Expand Down
11 changes: 11 additions & 0 deletions sdk/purview/azure-analytics-purview-administration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Release History

## 1.0.0-beta.2 (Unreleased)



## 1.0.0-beta.1 (2021-10-15)

### Other Changes

- Initial beta release for Purview Administration client library.
116 changes: 116 additions & 0 deletions sdk/purview/azure-analytics-purview-administration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Azure Purview Administration client library for Java

Azure Purview data plane administration. It supports data plane operations. It can manage account, collections, keys, resource set rule, metadata policy, metadata roles.

**Please rely heavily on the [service's documentation][product_documentation] and [Protocol method documentation][protocol_method] to use this library**

[Package (Maven)][package] | [API reference documentation][api_reference_doc] | [Product Documentation][product_documentation]

## Getting started

### Prerequisites

- A [Java Development Kit (JDK)][jdk_link], version 8 or later.
- [Azure Subscription][azure_subscription]
- An existing Azure Purview administration.

For more information about creating the account see [here][create_azure_purview_account].

Some API in administration requires permissions for the user or the service principal authenticated with the client.
For more information about permissions, see [here][azure_purview_permissions].

### Include the Package

[//]: # ({x-version-update-start;com.azure:azure-analytics-purview-administration;current})
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-analytics-purview-administration</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

### Authenticate the client

In order to interact with the Azure Purview service, your client must present an Azure Active Directory bearer token to the service.

The simplest way of providing a bearer token is to use the `DefaultAzureCredential` authentication method by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity].

#### Create AccountsClient with Azure Active Directory Credential

You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity].

To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below, or other credential providers provided with the Azure SDK, please include the `azure-identity` package:

[//]: # ({x-version-update-start;com.azure:azure-identity;dependency})
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.3.6</version>
</dependency>
```
[//]: # ({x-version-update-end})

Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET.

##### Example

<!-- embedme ./src/samples/java/com/azure/analytics/purview/administration/ReadmeSamples.java#L10-L13 -->
```java
AccountsClient client = new PurviewAccountClientBuilder()
.endpoint(System.getenv("ACCOUNT_ENDPOINT"))
.credential(new DefaultAzureCredentialBuilder().build())
.buildAccountsClient();
```

## Key concepts

## Examples

<!-- embedme ./src/samples/java/com/azure/analytics/purview/administration/GetAccount.java#L11-L15 -->
```java
AccountsClient client = new PurviewAccountClientBuilder()
.endpoint(System.getenv("ACCOUNT_ENDPOINT"))
.credential(new DefaultAzureCredentialBuilder().build())
.buildAccountsClient();
BinaryData response = client.getAccountPropertiesWithResponse(null, null).getValue();
```

## Troubleshooting

### Enabling Logging

Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite
their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help
locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.

## Next steps

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [[email protected]][coc_contact] with any additional questions or comments.

<!-- LINKS -->
[azure_subscription]: https://azure.microsoft.com/free/
[api_reference_doc]: https://azure.github.io/azure-sdk-for-java
[product_documentation]: https://azure.microsoft.com/services/purview/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity
[DefaultAzureCredential]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#defaultazurecredential
[jdk_link]: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable
[package]: https://mvnrepository.com/artifact/com.azure/azure-analytics-purview-administration
[protocol_method]: https://github.com/Azure/azure-sdk-for-java/wiki/Protocol-Methods
[cla]: https://cla.microsoft.com
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:[email protected]
[create_azure_purview_account]: https://docs.microsoft.com/azure/purview/create-catalog-portal
[azure_purview_permissions]: https://docs.microsoft.com/azure/purview/catalog-permissions
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fpurview%2Fazure-analytics-purview-administration%2FREADME.png)
74 changes: 74 additions & 0 deletions sdk/purview/azure-analytics-purview-administration/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.azure</groupId>
<artifactId>azure-client-sdk-parent</artifactId>
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
</parent>

<groupId>com.azure</groupId>
<artifactId>azure-analytics-purview-administration</artifactId>
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure:azure-analytics-purview-administration;current} -->

<name>Microsoft Azure client library for Purview Administration</name>
<description>This package contains Microsoft Azure Purview Administration client library.</description>

<distributionManagement>
<site>
<id>azure-java-build-docs</id>
<url>${site.url}/site/${project.artifactId}</url>
</site>
</distributionManagement>

<scm>
<url>scm:git:https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
<tag>HEAD</tag>
</scm>

<properties>
<jacoco.skip.coverage.check>true</jacoco.skip.coverage.check>
</properties>

<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.22.0-beta.1</version> <!-- {x-version-update;beta_com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.11.1</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.7.3</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.4</version> <!-- {x-version-update;org.glassfish:javax.json;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit fcfd296

Please sign in to comment.