@azure-rest/purview-scanning 1.0.0-alpha.20250220.1 → 1.0.0-alpha.20250224.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -27
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -55,12 +55,13 @@ AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
|
|
|
55
55
|
|
|
56
56
|
Use the returned token credential to authenticate the client:
|
|
57
57
|
|
|
58
|
-
```
|
|
58
|
+
```ts snippet:ReadmeSampleCreateClient_Node
|
|
59
59
|
import PurviewScanning from "@azure-rest/purview-scanning";
|
|
60
60
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
61
|
+
|
|
61
62
|
const client = PurviewScanning(
|
|
62
63
|
"https://<my-account-name>.purview.azure.com",
|
|
63
|
-
new DefaultAzureCredential()
|
|
64
|
+
new DefaultAzureCredential(),
|
|
64
65
|
);
|
|
65
66
|
```
|
|
66
67
|
|
|
@@ -78,33 +79,24 @@ The following section shows you how to initialize and authenticate your client,
|
|
|
78
79
|
|
|
79
80
|
### List All Data Sources
|
|
80
81
|
|
|
81
|
-
```
|
|
82
|
-
import PurviewScanning, {
|
|
82
|
+
```ts snippet:ReadmeSampleListAllDataSources
|
|
83
|
+
import PurviewScanning, { isUnexpected, paginate } from "@azure-rest/purview-scanning";
|
|
83
84
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
new DefaultAzureCredential()
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
const dataSources = await client.path("/datasources").get();
|
|
93
|
-
if (isUnexpected(dataSources)) {
|
|
94
|
-
throw dataSources.body.error;
|
|
95
|
-
}
|
|
96
|
-
const iter = paginate(client, dataSources);
|
|
97
|
-
|
|
98
|
-
const items: DataSourceOutput[] = [];
|
|
99
|
-
|
|
100
|
-
for await (const item of <PagedAsyncIterableIterator<DataSourceOutput, (DataSourceOutput)[], PageSettings>>iter) {
|
|
101
|
-
items.push(item);
|
|
102
|
-
}
|
|
86
|
+
const client = PurviewScanning(
|
|
87
|
+
"https://<my-account-name>.purview.azure.com",
|
|
88
|
+
new DefaultAzureCredential(),
|
|
89
|
+
);
|
|
103
90
|
|
|
104
|
-
|
|
91
|
+
const dataSources = await client.path("/datasources").get();
|
|
92
|
+
if (isUnexpected(dataSources)) {
|
|
93
|
+
throw dataSources.body.error;
|
|
105
94
|
}
|
|
106
95
|
|
|
107
|
-
|
|
96
|
+
const pagedDataSources = paginate(client, dataSources);
|
|
97
|
+
for await (const dataSource of pagedDataSources) {
|
|
98
|
+
console.log(`Data Source Name: ${dataSource.name}`);
|
|
99
|
+
}
|
|
108
100
|
```
|
|
109
101
|
|
|
110
102
|
## Troubleshooting
|
|
@@ -113,7 +105,7 @@ main().catch(console.error);
|
|
|
113
105
|
|
|
114
106
|
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
115
107
|
|
|
116
|
-
```ts
|
|
108
|
+
```ts snippet:SetLogLevel
|
|
117
109
|
import { setLogLevel } from "@azure/logger";
|
|
118
110
|
|
|
119
111
|
setLogLevel("info");
|
|
@@ -131,8 +123,6 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
|
131
123
|
|
|
132
124
|
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
|
|
133
125
|
|
|
134
|
-
|
|
135
|
-
|
|
136
126
|
<!-- LINKS -->
|
|
137
127
|
|
|
138
128
|
[scanning_product_documentation]: https://azure.microsoft.com/services/purview/
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "An isomorphic rest level client library for the Azure Purview Scanning service.",
|
|
6
|
-
"version": "1.0.0-alpha.
|
|
6
|
+
"version": "1.0.0-alpha.20250224.2",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
9
9
|
"azure",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
74
74
|
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
75
75
|
"unit-test:node": "dev-tool run test:vitest",
|
|
76
|
-
"update-snippets": "
|
|
76
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
77
77
|
},
|
|
78
78
|
"sideEffects": false,
|
|
79
79
|
"autoPublish": false,
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@azure/abort-controller": "^2.1.2",
|
|
83
83
|
"@azure/core-auth": "^1.9.0",
|
|
84
84
|
"@azure/core-lro": "^3.1.0",
|
|
85
|
-
"@azure/core-rest-pipeline": "^1.
|
|
86
|
-
"@azure/logger": "^1.
|
|
85
|
+
"@azure/core-rest-pipeline": "^1.19.0",
|
|
86
|
+
"@azure/logger": "^1.1.4",
|
|
87
87
|
"tslib": "^2.8.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
@@ -92,15 +92,15 @@
|
|
|
92
92
|
"@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
|
|
93
93
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
94
94
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
95
|
-
"@azure/identity": "^4.
|
|
95
|
+
"@azure/identity": "^4.7.0",
|
|
96
96
|
"@types/node": "^18.0.0",
|
|
97
|
-
"@vitest/browser": "^3.0.
|
|
98
|
-
"@vitest/coverage-istanbul": "^3.0.
|
|
97
|
+
"@vitest/browser": "^3.0.6",
|
|
98
|
+
"@vitest/coverage-istanbul": "^3.0.6",
|
|
99
99
|
"dotenv": "^16.0.0",
|
|
100
100
|
"eslint": "^9.9.0",
|
|
101
|
-
"playwright": "^1.
|
|
101
|
+
"playwright": "^1.50.1",
|
|
102
102
|
"typescript": "~5.7.2",
|
|
103
|
-
"vitest": "^3.0.
|
|
103
|
+
"vitest": "^3.0.6"
|
|
104
104
|
},
|
|
105
105
|
"type": "module",
|
|
106
106
|
"tshy": {
|