@azure-rest/arm-compute 1.0.0-alpha.20250116.1 → 1.0.0-alpha.20250117.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.
Files changed (2) hide show
  1. package/README.md +29 -34
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -46,9 +46,10 @@ AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
46
46
 
47
47
  Use the returned token credential to authenticate the client:
48
48
 
49
- ```typescript
50
- import ComputeManagementClient from "@azure-rest/arm-compute";
49
+ ```ts snippet:ReadmeSampleCreateClient
51
50
  import { DefaultAzureCredential } from "@azure/identity";
51
+ import ComputeManagementClient from "@azure-rest/arm-compute";
52
+
52
53
  const credential = new DefaultAzureCredential();
53
54
  const client = ComputeManagementClient(credential);
54
55
  ```
@@ -59,39 +60,33 @@ The following section shows you how to initialize and authenticate your client,
59
60
 
60
61
  ### List all virtual machines within a resource group
61
62
 
62
- ```typescript
63
- import createComputeManagementClient, {
64
- VirtualMachinesListParameters,
65
- paginate,
66
- } from "@azure-rest/arm-compute";
63
+ ```ts snippet:ReadmeSampleVirtualMachinesList
67
64
  import { DefaultAzureCredential } from "@azure/identity";
68
- async function virtualMachinesListMaximumSetGen() {
69
- const credential = new DefaultAzureCredential();
70
- const client = createComputeManagementClient(credential);
71
- const subscriptionId = "";
72
- const resourceGroupName = "rgcompute";
73
- const options: VirtualMachinesListParameters = {
74
- queryParameters: {
75
- $filter: "aaaaaaaaaaaaaaaaaaaaaaa",
76
- "api-version": "2022-08-01",
77
- },
78
- };
79
- const initialResponse = await client
80
- .path(
81
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines",
82
- subscriptionId,
83
- resourceGroupName,
84
- )
85
- .get(options);
86
- const pageData = paginate(client, initialResponse);
87
- const result = [];
88
- for await (const item of pageData) {
89
- result.push(item);
90
- }
91
- console.log(result);
92
- }
65
+ import ComputeManagementClient, { paginate } from "@azure-rest/arm-compute";
93
66
 
94
- virtualMachinesListMaximumSetGen().catch(console.error);
67
+ const credential = new DefaultAzureCredential();
68
+ const client = ComputeManagementClient(credential);
69
+
70
+ const subscriptionId = "";
71
+ const resourceGroupName = "rgcompute";
72
+ const options = {
73
+ queryParameters: {
74
+ $filter: "aaaaaaaaaaaaaaaaaaaaaaa",
75
+ "api-version": "2022-08-01",
76
+ },
77
+ };
78
+ const initialResponse = await client
79
+ .path(
80
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines",
81
+ subscriptionId,
82
+ resourceGroupName,
83
+ )
84
+ .get(options);
85
+
86
+ const pageData = paginate(client, initialResponse);
87
+ for await (const item of pageData) {
88
+ console.log(item);
89
+ }
95
90
  ```
96
91
 
97
92
  ## Troubleshooting
@@ -100,7 +95,7 @@ virtualMachinesListMaximumSetGen().catch(console.error);
100
95
 
101
96
  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`:
102
97
 
103
- ```javascript
98
+ ```ts snippet:SetLogLevel
104
99
  import { setLogLevel } from "@azure/logger";
105
100
 
106
101
  setLogLevel("info");
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure-rest/arm-compute",
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
- "version": "1.0.0-alpha.20250116.1",
5
+ "version": "1.0.0-alpha.20250117.2",
6
6
  "description": "",
7
7
  "keywords": [
8
8
  "node",
@@ -55,18 +55,18 @@
55
55
  "unit-test": "dev-tool run vendored cross-env TEST_MODE=playback && npm run unit-test:node && npm run unit-test:browser",
56
56
  "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
57
57
  "unit-test:node": "dev-tool run test:vitest",
58
- "update-snippets": "echo skipped"
58
+ "update-snippets": "dev-tool run update-snippets"
59
59
  },
60
60
  "sideEffects": false,
61
61
  "autoPublish": false,
62
62
  "dependencies": {
63
- "@azure-rest/core-client": "^1.0.0",
63
+ "@azure-rest/core-client": "^2.3.2",
64
64
  "@azure/abort-controller": "^2.1.2",
65
- "@azure/core-auth": "^1.3.0",
65
+ "@azure/core-auth": "^1.9.0",
66
66
  "@azure/core-lro": "^3.1.0",
67
- "@azure/core-rest-pipeline": "^1.8.0",
68
- "@azure/logger": "^1.0.0",
69
- "tslib": "^2.2.0"
67
+ "@azure/core-rest-pipeline": "^1.18.2",
68
+ "@azure/logger": "^1.1.4",
69
+ "tslib": "^2.8.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@azure-tools/test-credential": "^2.0.0",