@azure-rest/synapse-access-control 1.0.0-alpha.20250221.1 → 1.0.0-alpha.20250225.1
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 +11 -16
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -23,23 +23,20 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
|
|
|
23
23
|
|
|
24
24
|
## Examples
|
|
25
25
|
|
|
26
|
-
```ts
|
|
27
|
-
import AccessControl, { paginate } from "@azure-rest/synapse-access-control";
|
|
26
|
+
```ts snippet:ReadmeSampleCreateClient_Node
|
|
27
|
+
import AccessControl, { isUnexpected, paginate } from "@azure-rest/synapse-access-control";
|
|
28
28
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
const client = AccessControl("<endpoint>", new DefaultAzureCredential());
|
|
32
|
-
const initialResponse = await client.path("/roleAssignments").get();
|
|
30
|
+
const client = AccessControl("<endpoint>", new DefaultAzureCredential());
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const assignments = paginate(client, initialResponse);
|
|
32
|
+
const initialResponse = await client.path("/roleAssignments").get();
|
|
33
|
+
if (isUnexpected(initialResponse)) {
|
|
34
|
+
throw initialResponse.body.error;
|
|
35
|
+
}
|
|
39
36
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
37
|
+
const assignments = paginate(client, initialResponse);
|
|
38
|
+
for await (const assignment of assignments) {
|
|
39
|
+
console.log(`Role Assignment ID: ${assignment.id}`);
|
|
43
40
|
}
|
|
44
41
|
```
|
|
45
42
|
|
|
@@ -51,7 +48,7 @@ export async function main(): Promise<void> {
|
|
|
51
48
|
|
|
52
49
|
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`:
|
|
53
50
|
|
|
54
|
-
```ts
|
|
51
|
+
```ts snippet:SetLogLevel
|
|
55
52
|
import { setLogLevel } from "@azure/logger";
|
|
56
53
|
|
|
57
54
|
setLogLevel("info");
|
|
@@ -65,7 +62,5 @@ In the future, you'll find additional code samples here.
|
|
|
65
62
|
|
|
66
63
|
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
70
65
|
[synapse_product_documentation]: https://learn.microsoft.com/rest/api/synapse/data-plane/role-assignments/create-role-assignment
|
|
71
66
|
[rest_client]: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md
|
package/package.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/synapse/synapse-access-control/README.md",
|
|
6
6
|
"repository": "github:Azure/azure-sdk-for-js",
|
|
7
7
|
"sdk-type": "client",
|
|
8
|
-
"version": "1.0.0-alpha.
|
|
8
|
+
"version": "1.0.0-alpha.20250225.1",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@azure-rest/core-client": "^2.3.1",
|
|
11
11
|
"@azure/core-auth": "^1.9.0",
|
|
12
|
-
"@azure/core-rest-pipeline": "^1.
|
|
12
|
+
"@azure/core-rest-pipeline": "^1.19.0",
|
|
13
13
|
"tslib": "^2.8.1"
|
|
14
14
|
},
|
|
15
15
|
"//metadata": {
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"module": "./dist/esm/index.js",
|
|
38
38
|
"types": "./dist/commonjs/index.d.ts",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@azure/logger": "^1.0.0",
|
|
41
40
|
"@azure-tools/test-credential": "^2.0.0",
|
|
42
41
|
"@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
|
|
43
42
|
"@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
|
|
44
43
|
"@azure/core-util": "^1.11.0",
|
|
45
44
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
46
45
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
47
|
-
"@azure/identity": "^4.0
|
|
46
|
+
"@azure/identity": "^4.7.0",
|
|
47
|
+
"@azure/logger": "^1.1.4",
|
|
48
48
|
"@types/node": "^18.0.0",
|
|
49
|
-
"@vitest/browser": "^3.0.
|
|
50
|
-
"@vitest/coverage-istanbul": "^3.0.
|
|
49
|
+
"@vitest/browser": "^3.0.6",
|
|
50
|
+
"@vitest/coverage-istanbul": "^3.0.6",
|
|
51
51
|
"dotenv": "^16.0.0",
|
|
52
52
|
"eslint": "^9.9.0",
|
|
53
|
-
"playwright": "^1.
|
|
53
|
+
"playwright": "^1.50.1",
|
|
54
54
|
"typescript": "~5.7.2",
|
|
55
|
-
"vitest": "^3.0.
|
|
55
|
+
"vitest": "^3.0.6"
|
|
56
56
|
},
|
|
57
57
|
"bugs": {
|
|
58
58
|
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
83
83
|
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
84
84
|
"unit-test:node": "dev-tool run test:vitest",
|
|
85
|
-
"update-snippets": "
|
|
85
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
86
86
|
},
|
|
87
87
|
"//sampleConfiguration": {
|
|
88
88
|
"productName": "Azure Synapse Access Control Rest",
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"sideEffects": false,
|
|
100
100
|
"type": "module",
|
|
101
101
|
"tshy": {
|
|
102
|
+
"project": "./tsconfig.src.json",
|
|
102
103
|
"exports": {
|
|
103
104
|
"./package.json": "./package.json",
|
|
104
105
|
".": "./src/index.ts"
|
|
@@ -111,8 +112,7 @@
|
|
|
111
112
|
"browser",
|
|
112
113
|
"react-native"
|
|
113
114
|
],
|
|
114
|
-
"selfLink": false
|
|
115
|
-
"project": "./tsconfig.src.json"
|
|
115
|
+
"selfLink": false
|
|
116
116
|
},
|
|
117
117
|
"exports": {
|
|
118
118
|
"./package.json": "./package.json",
|
|
@@ -134,5 +134,6 @@
|
|
|
134
134
|
"default": "./dist/commonjs/index.js"
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
}
|
|
137
|
+
},
|
|
138
|
+
"react-native": "./dist/react-native/index.js"
|
|
138
139
|
}
|