Skip to content

Commit 051b969

Browse files
[Purview] Release Purview Administration (Azure#24770)
1 parent 186c119 commit 051b969

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+6700
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31806.525
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Purview.Administration", "src\Azure.Analytics.Purview.Administration.csproj", "{B0C276D1-2930-4887-B29A-D1A33E7009A2}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Analytics.Purview.Administration.Tests", "tests\Azure.Analytics.Purview.Administration.Tests.csproj", "{8E9A77AC-792A-4432-8320-ACFD46730401}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
11+
EndProject
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Test.Stress", "..\..\..\common\Stress\Azure.Test.Stress\Azure.Test.Stress.csproj", "{A4241C1F-A53D-474C-9E4E-075054407E74}"
13+
EndProject
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Test.Perf", "..\..\..\common\Perf\Azure.Test.Perf\Azure.Test.Perf.csproj", "{FA8BD3F1-8616-47B6-974C-7576CDF4717E}"
15+
EndProject
16+
Global
17+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
18+
Debug|Any CPU = Debug|Any CPU
19+
Release|Any CPU = Release|Any CPU
20+
EndGlobalSection
21+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
30+
{ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31+
{ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
33+
{ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
38+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
42+
EndGlobalSection
43+
GlobalSection(SolutionProperties) = preSolution
44+
HideSolutionNode = FALSE
45+
EndGlobalSection
46+
GlobalSection(ExtensibilityGlobals) = postSolution
47+
SolutionGuid = {B6DFAA14-2473-4BC3-B66B-4421B51AE592}
48+
EndGlobalSection
49+
EndGlobal
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2021-10-19)
4+
5+
### New Features
6+
7+
- Initial preview release of the Azure Purview Administration client library for .NET
8+
- Provides operations for Purview Account and MetadataPolicies services
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<!--
3+
Add any shared properties you want for the projects under this package directory that need to be set before the auto imported Directory.Build.props
4+
-->
5+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
6+
</Project>
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Azure Purview Administration client library for .NET
2+
3+
Azure Purview Administration contains the Purview Account and Purview MetdataPolicy managed cloud service.
4+
5+
**Please rely heavily on the [service's documentation][account_product_documentation] and our [protocol client docs][protocol_client_quickstart] to use this library**
6+
7+
[Source code][source_code] | [Package (NuGet)][client_nuget_package] | [Product documentation][account_product_documentation]
8+
9+
## Getting started
10+
11+
### Install the package
12+
13+
Install the Azure Purview Administration client library for .NET with [NuGet][client_nuget_package]:
14+
15+
```dotnetcli
16+
dotnet add package Azure.Analysis.Purview.Administration
17+
```
18+
19+
### Prerequisites
20+
21+
- You must have an [Azure subscription][azure_subscription] and a [Purview resource][purview_resource] to use this package.
22+
23+
### Authenticate the client
24+
25+
#### Using Azure Active Directory
26+
27+
This document demonstrates using [DefaultAzureCredential][default_cred_ref] to authenticate via Azure Active Directory. However, any of the credentials offered by the [Azure.Identity][azure_identity] will be accepted. See the [Azure.Identity][azure_identity] documentation for more information about other credentials.
28+
29+
Once you have chosen and configured your credential, you can create instances of the `PurviewAccountClient`, `PurviewMetadataPolicyClient` or `PurviewMetadataRolesClient`.
30+
31+
```C#
32+
var credential = new DefaultAzureCredential();
33+
var accountClient = new PurviewAccountClient(new Url("https://<my-account-name>.purview.azure.com"), credential);
34+
var policyClient = new PurviewMetadataPolicyClient(new Url("https://<my-account-name>.purview.azure.com"), "myCollection", credential);
35+
var roleClient = new PurviewMetadataRolesClient(new Url("https://<my-account-name>.purview.azure.com"), credential);
36+
```
37+
38+
## Key concepts
39+
40+
### Protocol Methods
41+
42+
Operations exposed by the Purview Account SDK for .NET use *protocol methods* to expose the underlying REST operations. You can learn more about how to use SDK Clients which use protocol methods in our [documentation][protocol_client_quickstart].
43+
44+
### Thread safety
45+
46+
We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
47+
48+
### Additional concepts
49+
<!-- CLIENT COMMON BAR -->
50+
[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) |
51+
[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) |
52+
[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) |
53+
[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) |
54+
[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) |
55+
[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) |
56+
[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/)
57+
<!-- CLIENT COMMON BAR -->
58+
59+
## Examples
60+
61+
The following section shows you how to initialize and authenticate your client, then get all of the type definitions in the catalog.
62+
63+
### Get All Account Type Definitions
64+
65+
```C#
66+
var credential = new DefaultAzureCredential();
67+
var client = new PurviewAccountClient(new Uri("https://<my-account-name>.purview.azure.com"), credential);
68+
69+
var Response response = await client.GetAccountPropertiesAsync();
70+
var responseDocument = JsonDocument.Parse(response.Content);
71+
Console.WriteLine(responseDocument.RootElement.GetProperty("name"));
72+
```
73+
74+
### List All Roles
75+
76+
```C#
77+
var credential = new DefaultAzureCredential();
78+
var client = new PurviewMetadataRolesClient(new Uri("https://<my-account-name>.purview.azure.com"), credential);
79+
80+
AsyncPageable<BinaryData> fetchResponse = client.GetMetadataRolesAsync(new());
81+
await foreach (BinaryData item in fetchResponse)
82+
{
83+
JsonElement fetchBodyJson = JsonDocument.Parse(item).RootElement;
84+
Console.WriteLine(fetchBodyJson.GetProperty("id"));
85+
}
86+
```
87+
88+
## Troubleshooting
89+
90+
### Setting up console logging
91+
92+
The simplest way to see the logs is to enable the console logging.
93+
To create an Azure SDK log listener that outputs messages to console use AzureEventSourceListener.CreateConsoleLogger method.
94+
95+
```C#
96+
// Setup a listener to monitor logged events.
97+
using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();
98+
```
99+
100+
To learn more about other logging mechanisms see [here][azure_core_diagnostics].
101+
102+
## Next steps
103+
104+
This client SDK exposes operations using *protocol methods*, you can learn more about how to use SDK Clients which use protocol methods in our [documentation][protocol_client_quickstart].
105+
106+
## Contributing
107+
108+
See the [CONTRIBUTING.md][contributing] for details on building, testing, and contributing to this library.
109+
110+
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla].
111+
112+
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.
113+
114+
This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.
115+
116+
<!-- LINKS -->
117+
[source_code]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/purview/Azure.Analytics.Purview.Account/src
118+
[client_nuget_package]: https://www.nuget.org/packages?q=Azure.Analytics.Purview.Account
119+
[account_product_documentation]: https://azure.microsoft.com/services/purview/
120+
[azure_identity]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity
121+
[protocol_client_quickstart]: https://aka.ms/azsdk/net/protocol/quickstart
122+
[default_cred_ref]: https://docs.microsoft.com/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet
123+
[azure_subscription]: https://azure.microsoft.com/free/dotnet/
124+
[purview_resource]: https://docs.microsoft.com/azure/purview
125+
[azure_core_diagnostics]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md
126+
[cla]: https://cla.microsoft.com
127+
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
128+
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
129+
[coc_contact]: mailto:opencode@microsoft.com
130+
131+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Fpurview%2FAzure.Analytics.Purview.Catalog%2FREADME.png)
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
namespace Azure.Analytics.Purview.Administration
2+
{
3+
public partial class PurviewAccountClient
4+
{
5+
protected PurviewAccountClient() { }
6+
public PurviewAccountClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Purview.Administration.PurviewAccountClientOptions options = null) { }
7+
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
8+
public virtual Azure.Response GetAccessKeys(Azure.RequestOptions options) { throw null; }
9+
public virtual System.Threading.Tasks.Task<Azure.Response> GetAccessKeysAsync(Azure.RequestOptions options) { throw null; }
10+
public virtual Azure.Response GetAccountProperties(Azure.RequestOptions options) { throw null; }
11+
public virtual System.Threading.Tasks.Task<Azure.Response> GetAccountPropertiesAsync(Azure.RequestOptions options) { throw null; }
12+
public virtual Azure.Analytics.Purview.Administration.PurviewCollection GetCollectionClient(string collectionName) { throw null; }
13+
public virtual Azure.Pageable<System.BinaryData> GetCollections(Azure.RequestOptions options, string skipToken = null) { throw null; }
14+
public virtual Azure.AsyncPageable<System.BinaryData> GetCollectionsAsync(Azure.RequestOptions options, string skipToken = null) { throw null; }
15+
public virtual Azure.Analytics.Purview.Administration.PurviewResourceSetRule GetResourceSetRuleClient() { throw null; }
16+
public virtual Azure.Pageable<System.BinaryData> GetResourceSetRules(Azure.RequestOptions options, string skipToken = null) { throw null; }
17+
public virtual Azure.AsyncPageable<System.BinaryData> GetResourceSetRulesAsync(Azure.RequestOptions options, string skipToken = null) { throw null; }
18+
public virtual Azure.Response RegenerateAccessKey(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
19+
public virtual System.Threading.Tasks.Task<Azure.Response> RegenerateAccessKeyAsync(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
20+
public virtual Azure.Response UpdateAccountProperties(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
21+
public virtual System.Threading.Tasks.Task<Azure.Response> UpdateAccountPropertiesAsync(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
22+
}
23+
public partial class PurviewAccountClientOptions : Azure.Core.ClientOptions
24+
{
25+
public PurviewAccountClientOptions(Azure.Analytics.Purview.Administration.PurviewAccountClientOptions.ServiceVersion version = Azure.Analytics.Purview.Administration.PurviewAccountClientOptions.ServiceVersion.V2019_11_01_preview) { }
26+
public enum ServiceVersion
27+
{
28+
V2019_11_01_preview = 1,
29+
}
30+
}
31+
public partial class PurviewCollection
32+
{
33+
protected PurviewCollection() { }
34+
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
35+
public virtual Azure.Response CreateOrUpdateCollection(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
36+
public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrUpdateCollectionAsync(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
37+
public virtual Azure.Response DeleteCollection(Azure.RequestOptions options = null) { throw null; }
38+
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteCollectionAsync(Azure.RequestOptions options = null) { throw null; }
39+
public virtual Azure.Response GetCollection(Azure.RequestOptions options) { throw null; }
40+
public virtual System.Threading.Tasks.Task<Azure.Response> GetCollectionAsync(Azure.RequestOptions options) { throw null; }
41+
public virtual Azure.Response GetCollectionPath(Azure.RequestOptions options) { throw null; }
42+
public virtual System.Threading.Tasks.Task<Azure.Response> GetCollectionPathAsync(Azure.RequestOptions options) { throw null; }
43+
public virtual Azure.Pageable<System.BinaryData> ListChildCollectionNames(Azure.RequestOptions options, string skipToken = null) { throw null; }
44+
public virtual Azure.AsyncPageable<System.BinaryData> ListChildCollectionNamesAsync(Azure.RequestOptions options, string skipToken = null) { throw null; }
45+
}
46+
public partial class PurviewMetadataClientOptions : Azure.Core.ClientOptions
47+
{
48+
public PurviewMetadataClientOptions(Azure.Analytics.Purview.Administration.PurviewMetadataClientOptions.ServiceVersion version = Azure.Analytics.Purview.Administration.PurviewMetadataClientOptions.ServiceVersion.V2021_07_01) { }
49+
public enum ServiceVersion
50+
{
51+
V2021_07_01 = 1,
52+
}
53+
}
54+
public partial class PurviewMetadataPolicyClient
55+
{
56+
protected PurviewMetadataPolicyClient() { }
57+
public PurviewMetadataPolicyClient(System.Uri endpoint, string collectionName, Azure.Core.TokenCredential credential, Azure.Analytics.Purview.Administration.PurviewMetadataClientOptions options = null) { }
58+
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
59+
public virtual Azure.Pageable<System.BinaryData> GetMetadataPolicies(Azure.RequestOptions options) { throw null; }
60+
public virtual Azure.AsyncPageable<System.BinaryData> GetMetadataPoliciesAsync(Azure.RequestOptions options) { throw null; }
61+
public virtual Azure.Response GetMetadataPolicy(string policyId, Azure.RequestOptions options) { throw null; }
62+
public virtual System.Threading.Tasks.Task<Azure.Response> GetMetadataPolicyAsync(string policyId, Azure.RequestOptions options) { throw null; }
63+
public virtual Azure.Response UpdateMetadataPolicy(string policyId, Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
64+
public virtual System.Threading.Tasks.Task<Azure.Response> UpdateMetadataPolicyAsync(string policyId, Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
65+
}
66+
public partial class PurviewMetadataRolesClient
67+
{
68+
protected PurviewMetadataRolesClient() { }
69+
public PurviewMetadataRolesClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Purview.Administration.PurviewMetadataClientOptions options = null) { }
70+
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
71+
public virtual Azure.Pageable<System.BinaryData> GetMetadataRoles(Azure.RequestOptions options) { throw null; }
72+
public virtual Azure.AsyncPageable<System.BinaryData> GetMetadataRolesAsync(Azure.RequestOptions options) { throw null; }
73+
}
74+
public partial class PurviewResourceSetRule
75+
{
76+
protected PurviewResourceSetRule() { }
77+
public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
78+
public virtual Azure.Response CreateOrUpdateResourceSetRule(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
79+
public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrUpdateResourceSetRuleAsync(Azure.Core.RequestContent content, Azure.RequestOptions options = null) { throw null; }
80+
public virtual Azure.Response DeleteResourceSetRule(Azure.RequestOptions options = null) { throw null; }
81+
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteResourceSetRuleAsync(Azure.RequestOptions options = null) { throw null; }
82+
public virtual Azure.Response GetResourceSetRule(Azure.RequestOptions options) { throw null; }
83+
public virtual System.Threading.Tasks.Task<Azure.Response> GetResourceSetRuleAsync(Azure.RequestOptions options) { throw null; }
84+
}
85+
}

0 commit comments

Comments
 (0)