@azure/arm-attestation 2.1.1-alpha.20250109.1 → 2.1.1-alpha.20250113.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 +25 -16
- package/package.json +13 -14
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Various APIs for managing resources in attestation service. This primarily encom
|
|
|
6
6
|
|
|
7
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/attestation/arm-attestation) |
|
|
8
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-attestation) |
|
|
9
|
-
[API reference documentation](https://
|
|
9
|
+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-attestation) |
|
|
10
10
|
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
11
|
|
|
12
12
|
## Getting started
|
|
@@ -46,26 +46,34 @@ npm install @azure/identity
|
|
|
46
46
|
You will also need to **register a new AAD application and grant access to Azure AttestationManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
|
47
47
|
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`.
|
|
48
48
|
|
|
49
|
-
For more information about how to create an Azure AD Application check out [this guide](https://
|
|
49
|
+
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
|
|
52
|
+
|
|
53
|
+
```ts snippet:ReadmeSampleCreateClient_Node
|
|
54
|
+
import { AttestationManagementClient } from "@azure/arm-attestation";
|
|
55
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
55
56
|
|
|
56
57
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
57
58
|
const client = new AttestationManagementClient(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
-
|
|
59
|
-
// For client-side applications running in the browser, use this code instead:
|
|
60
|
-
// const credential = new InteractiveBrowserCredential({
|
|
61
|
-
// tenantId: "<YOUR_TENANT_ID>",
|
|
62
|
-
// clientId: "<YOUR_CLIENT_ID>"
|
|
63
|
-
// });
|
|
64
|
-
// const client = new AttestationManagementClient(credential, subscriptionId);
|
|
65
59
|
```
|
|
66
60
|
|
|
61
|
+
For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
|
|
62
|
+
|
|
63
|
+
```ts snippet:ReadmeSampleCreateClient_Browser
|
|
64
|
+
import { InteractiveBrowserCredential } from "@azure/identity";
|
|
65
|
+
import { AttestationManagementClient } from "@azure/arm-attestation";
|
|
66
|
+
|
|
67
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
68
|
+
const credential = new InteractiveBrowserCredential({
|
|
69
|
+
tenantId: "<YOUR_TENANT_ID>",
|
|
70
|
+
clientId: "<YOUR_CLIENT_ID>",
|
|
71
|
+
});
|
|
72
|
+
const client = new AttestationManagementClient(credential, subscriptionId);
|
|
73
|
+
```
|
|
67
74
|
|
|
68
75
|
### JavaScript Bundle
|
|
76
|
+
|
|
69
77
|
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
|
70
78
|
|
|
71
79
|
## Key concepts
|
|
@@ -80,8 +88,9 @@ To use this client library in the browser, first you need to use a bundler. For
|
|
|
80
88
|
|
|
81
89
|
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`:
|
|
82
90
|
|
|
83
|
-
```
|
|
84
|
-
|
|
91
|
+
```ts snippet:SetLogLevel
|
|
92
|
+
import { setLogLevel } from "@azure/logger";
|
|
93
|
+
|
|
85
94
|
setLogLevel("info");
|
|
86
95
|
```
|
|
87
96
|
|
|
@@ -101,7 +110,7 @@ If you'd like to contribute to this library, please read the [contributing guide
|
|
|
101
110
|
|
|
102
111
|

|
|
103
112
|
|
|
104
|
-
[azure_cli]: https://
|
|
113
|
+
[azure_cli]: https://learn.microsoft.com/cli/azure
|
|
105
114
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
106
115
|
[azure_sub]: https://azure.microsoft.com/free/
|
|
107
116
|
[azure_portal]: https://portal.azure.com
|
package/package.json
CHANGED
|
@@ -3,23 +3,24 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for AttestationManagementClient.",
|
|
6
|
-
"version": "2.1.1-alpha.
|
|
6
|
+
"version": "2.1.1-alpha.20250113.1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@azure/core-auth": "^1.
|
|
12
|
-
"@azure/core-client": "^1.
|
|
13
|
-
"@azure/core-paging": "^1.2
|
|
14
|
-
"@azure/core-rest-pipeline": "^1.
|
|
15
|
-
"tslib": "^2.
|
|
11
|
+
"@azure/core-auth": "^1.9.0",
|
|
12
|
+
"@azure/core-client": "^1.9.2",
|
|
13
|
+
"@azure/core-paging": "^1.6.2",
|
|
14
|
+
"@azure/core-rest-pipeline": "^1.18.0",
|
|
15
|
+
"tslib": "^2.8.1"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"node",
|
|
19
19
|
"azure",
|
|
20
20
|
"typescript",
|
|
21
21
|
"browser",
|
|
22
|
-
"isomorphic"
|
|
22
|
+
"isomorphic",
|
|
23
|
+
"cloud"
|
|
23
24
|
],
|
|
24
25
|
"license": "MIT",
|
|
25
26
|
"main": "./dist/commonjs/index.js",
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
"@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
|
|
31
32
|
"@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
|
|
32
33
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
33
|
-
"@azure/identity": "^4.0
|
|
34
|
+
"@azure/identity": "^4.5.0",
|
|
35
|
+
"@azure/logger": "^1.1.4",
|
|
34
36
|
"@types/node": "^18.0.0",
|
|
35
37
|
"@vitest/browser": "^2.1.8",
|
|
36
38
|
"@vitest/coverage-istanbul": "^2.1.8",
|
|
@@ -39,10 +41,7 @@
|
|
|
39
41
|
"vitest": "^2.1.8"
|
|
40
42
|
},
|
|
41
43
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/attestation/arm-attestation",
|
|
42
|
-
"repository":
|
|
43
|
-
"type": "git",
|
|
44
|
-
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
|
45
|
-
},
|
|
44
|
+
"repository": "github:Azure/azure-sdk-for-js",
|
|
46
45
|
"bugs": {
|
|
47
46
|
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
48
47
|
},
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
78
77
|
"unit-test:browser": "echo skipped",
|
|
79
78
|
"unit-test:node": "dev-tool run test:vitest",
|
|
80
|
-
"update-snippets": "
|
|
79
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
81
80
|
},
|
|
82
81
|
"sideEffects": false,
|
|
83
82
|
"//metadata": {
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
"azure"
|
|
96
95
|
],
|
|
97
96
|
"disableDocsMs": true,
|
|
98
|
-
"apiRefLink": "https://
|
|
97
|
+
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-attestation?view=azure-node-preview"
|
|
99
98
|
},
|
|
100
99
|
"type": "module",
|
|
101
100
|
"tshy": {
|