diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Create.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Create.js new file mode 100644 index 0000000000..ba0a654ef2 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Create.js @@ -0,0 +1,19 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or update a dashboard for grafana resource. This API is idempotent, so user can either create a new dashboard or update an existing dashboard. + * + * @summary create or update a dashboard for grafana resource. This API is idempotent, so user can either create a new dashboard or update an existing dashboard. + * x-ms-original-file: 2025-08-01/Dashboard_Create.json + */ +async function dashboardCreate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.managedDashboards.create("myResourceGroup", "myDashboard", { + location: "West US", + tags: { Environment: "Dev" }, + }); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Create.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Create.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Create.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Delete.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Delete.js new file mode 100644 index 0000000000..571be2974d --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Delete.js @@ -0,0 +1,15 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a dashboard for Grafana resource. + * + * @summary delete a dashboard for Grafana resource. + * x-ms-original-file: 2025-08-01/Dashboard_Delete.json + */ +async function dashboardDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + await client.managedDashboards.delete("myResourceGroup", "myDashboard"); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Delete.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Delete.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Get.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Get.js new file mode 100644 index 0000000000..1fe286db6b --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Get.js @@ -0,0 +1,16 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the properties of a specific dashboard for grafana resource. + * + * @summary get the properties of a specific dashboard for grafana resource. + * x-ms-original-file: 2025-08-01/Dashboard_Get.json + */ +async function dashboardGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.managedDashboards.get("myResourceGroup", "myDashboard"); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Get.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Get.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_List.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_List.js new file mode 100644 index 0000000000..23c56a2a7f --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_List.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all resources of dashboards under the specified subscription. + * + * @summary list all resources of dashboards under the specified subscription. + * x-ms-original-file: 2025-08-01/Dashboard_List.json + */ +async function dashboardListByResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.managedDashboards.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_List.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_ListByResourceGroup.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_ListByResourceGroup.js new file mode 100644 index 0000000000..ea17ebc3f7 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_ListByResourceGroup.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all resources of dashboards under the specified resource group. + * + * @summary list all resources of dashboards under the specified resource group. + * x-ms-original-file: 2025-08-01/Dashboard_ListByResourceGroup.json + */ +async function dashboardListByResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.managedDashboards.list("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_ListByResourceGroup.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_ListByResourceGroup.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_ListByResourceGroup.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Update.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Update.js new file mode 100644 index 0000000000..359941eae4 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Update.js @@ -0,0 +1,18 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a dashboard for Grafana resource. + * + * @summary update a dashboard for Grafana resource. + * x-ms-original-file: 2025-08-01/Dashboard_Update.json + */ +async function dashboardUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.managedDashboards.update("myResourceGroup", "myDashboard", { + tags: { Environment: "Dev 2" }, + }); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Update.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Update.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Dashboard_Update.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/EnterpriseDetails_Post.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/EnterpriseDetails_Post.js new file mode 100644 index 0000000000..5b8e5166e1 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/EnterpriseDetails_Post.js @@ -0,0 +1,16 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to retrieve enterprise add-on details information + * + * @summary retrieve enterprise add-on details information + * x-ms-original-file: 2025-08-01/EnterpriseDetails_Post.json + */ +async function enterpriseDetailsPost() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.grafana.checkEnterpriseDetails("myResourceGroup", "myWorkspace"); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/EnterpriseDetails_Post.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/EnterpriseDetails_Post.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/EnterpriseDetails_Post.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Create.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Create.js new file mode 100644 index 0000000000..4ba93af8c7 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Create.js @@ -0,0 +1,57 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. + * + * @summary create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. + * x-ms-original-file: 2025-08-01/Grafana_Create.json + */ +async function grafanaCreate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.grafana.create("myResourceGroup", "myWorkspace", { + identity: { type: "SystemAssigned" }, + location: "West US", + properties: { + apiKey: "Enabled", + deterministicOutboundIP: "Enabled", + enterpriseConfigurations: { + marketplaceAutoRenew: "Enabled", + marketplacePlanId: "myPlanId", + }, + grafanaConfigurations: { + security: { csrfAlwaysCheck: false }, + smtp: { + enabled: true, + fromAddress: "test@sendemail.com", + fromName: "emailsender", + host: "smtp.sendemail.com:587", + password: "", + skipVerify: true, + startTLSPolicy: "OpportunisticStartTLS", + user: "username", + }, + snapshots: { externalEnabled: true }, + unifiedAlertingScreenshots: { captureEnabled: false }, + users: { editorsCanAdmin: true, viewersCanEdit: true }, + }, + grafanaIntegrations: { + azureMonitorWorkspaceIntegrations: [ + { + azureMonitorWorkspaceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace", + }, + ], + }, + grafanaMajorVersion: "9", + grafanaPlugins: { "sample-plugin-id": {} }, + publicNetworkAccess: "Enabled", + zoneRedundancy: "Enabled", + }, + sku: { name: "Standard" }, + tags: { Environment: "Dev" }, + }); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Create.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Create.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Create.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Delete.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Delete.js new file mode 100644 index 0000000000..45041a0703 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Delete.js @@ -0,0 +1,15 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a workspace for Grafana resource. + * + * @summary delete a workspace for Grafana resource. + * x-ms-original-file: 2025-08-01/Grafana_Delete.json + */ +async function grafanaDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + await client.grafana.delete("myResourceGroup", "myWorkspace"); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Delete.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Delete.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_FetchAvailablePlugins.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_FetchAvailablePlugins.js new file mode 100644 index 0000000000..6a6d3bc4dd --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_FetchAvailablePlugins.js @@ -0,0 +1,16 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to a synchronous resource action. + * + * @summary a synchronous resource action. + * x-ms-original-file: 2025-08-01/Grafana_FetchAvailablePlugins.json + */ +async function grafanaFetchAvailablePlugins() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.grafana.fetchAvailablePlugins("myResourceGroup", "myWorkspace"); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_FetchAvailablePlugins.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_FetchAvailablePlugins.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_FetchAvailablePlugins.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Get.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Get.js new file mode 100644 index 0000000000..4c5bf22c7a --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Get.js @@ -0,0 +1,16 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the properties of a specific workspace for Grafana resource. + * + * @summary get the properties of a specific workspace for Grafana resource. + * x-ms-original-file: 2025-08-01/Grafana_Get.json + */ +async function grafanaGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.grafana.get("myResourceGroup", "myWorkspace"); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Get.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Get.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_List.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_List.js new file mode 100644 index 0000000000..0da7f2abc5 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_List.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all resources of workspaces for Grafana under the specified subscription. + * + * @summary list all resources of workspaces for Grafana under the specified subscription. + * x-ms-original-file: 2025-08-01/Grafana_List.json + */ +async function grafanaList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.grafana.list()) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_List.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_ListByResourceGroup.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_ListByResourceGroup.js new file mode 100644 index 0000000000..50edff41cd --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_ListByResourceGroup.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all resources of workspaces for Grafana under the specified resource group. + * + * @summary list all resources of workspaces for Grafana under the specified resource group. + * x-ms-original-file: 2025-08-01/Grafana_ListByResourceGroup.json + */ +async function grafanaListByResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.grafana.listByResourceGroup("myResourceGroup")) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_ListByResourceGroup.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_ListByResourceGroup.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_ListByResourceGroup.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Update.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Update.js new file mode 100644 index 0000000000..24f0f6dd27 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Update.js @@ -0,0 +1,53 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a workspace for Grafana resource. + * + * @summary update a workspace for Grafana resource. + * x-ms-original-file: 2025-08-01/Grafana_Update.json + */ +async function grafanaUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.grafana.update("myResourceGroup", "myWorkspace", { + properties: { + apiKey: "Enabled", + deterministicOutboundIP: "Enabled", + enterpriseConfigurations: { + marketplaceAutoRenew: "Enabled", + marketplacePlanId: "myPlanId", + }, + grafanaConfigurations: { + security: { csrfAlwaysCheck: false }, + smtp: { + enabled: true, + fromAddress: "test@sendemail.com", + fromName: "emailsender", + host: "smtp.sendemail.com:587", + password: "", + skipVerify: true, + startTLSPolicy: "OpportunisticStartTLS", + user: "username", + }, + snapshots: { externalEnabled: true }, + unifiedAlertingScreenshots: { captureEnabled: false }, + users: { editorsCanAdmin: true, viewersCanEdit: true }, + }, + grafanaIntegrations: { + azureMonitorWorkspaceIntegrations: [ + { + azureMonitorWorkspaceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace", + }, + ], + }, + grafanaMajorVersion: "9", + grafanaPlugins: { "sample-plugin-id": {} }, + }, + sku: { name: "Standard" }, + tags: { Environment: "Dev 2" }, + }); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Update.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Update.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Grafana_Update.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Create.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Create.js new file mode 100644 index 0000000000..a77e466134 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Create.js @@ -0,0 +1,30 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create a IntegrationFabric + * + * @summary create a IntegrationFabric + * x-ms-original-file: 2025-08-01/IntegrationFabrics_Create.json + */ +async function integrationFabricsCreate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.integrationFabrics.create( + "myResourceGroup", + "myWorkspace", + "sampleIntegration", + { + location: "West US", + properties: { + dataSourceResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Monitor/accounts/myAmw", + scenarios: ["scenario1", "scenario2"], + targetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myAks", + }, + }, + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Create.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Create.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Create.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Delete.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Delete.js new file mode 100644 index 0000000000..71154d5a2f --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Delete.js @@ -0,0 +1,15 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a IntegrationFabric + * + * @summary delete a IntegrationFabric + * x-ms-original-file: 2025-08-01/IntegrationFabrics_Delete.json + */ +async function integrationFabricsDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + await client.integrationFabrics.delete("myResourceGroup", "myWorkspace", "sampleIntegration"); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Delete.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Delete.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Get.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Get.js new file mode 100644 index 0000000000..8f0a9ed4a1 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Get.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a IntegrationFabric + * + * @summary get a IntegrationFabric + * x-ms-original-file: 2025-08-01/IntegrationFabrics_Get.json + */ +async function integrationFabricsGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.integrationFabrics.get( + "myResourceGroup", + "myWorkspace", + "sampleIntegration", + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Get.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Get.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_List.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_List.js new file mode 100644 index 0000000000..c5403ec2bf --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_List.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list IntegrationFabric resources by ManagedGrafana + * + * @summary list IntegrationFabric resources by ManagedGrafana + * x-ms-original-file: 2025-08-01/IntegrationFabrics_List.json + */ +async function integrationFabricsList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.integrationFabrics.list("myResourceGroup", "myWorkspace")) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_List.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Update.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Update.js new file mode 100644 index 0000000000..7af0ea32ff --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Update.js @@ -0,0 +1,24 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a IntegrationFabric + * + * @summary update a IntegrationFabric + * x-ms-original-file: 2025-08-01/IntegrationFabrics_Update.json + */ +async function integrationFabricsUpdate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.integrationFabrics.update( + "myResourceGroup", + "myWorkspace", + "sampleIntegration", + { + properties: { scenarios: ["scenario1"] }, + tags: { Environment: "Dev 2" }, + }, + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Update.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Update.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/IntegrationFabrics_Update.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Create.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Create.js new file mode 100644 index 0000000000..ec58bcd099 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Create.js @@ -0,0 +1,31 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or update a managed private endpoint for a grafana resource. + * + * @summary create or update a managed private endpoint for a grafana resource. + * x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Create.json + */ +async function managedPrivateEndpointCreate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.create( + "myResourceGroup", + "myWorkspace", + "myMPEName", + { + location: "West US", + properties: { + groupIds: ["grafana"], + privateLinkResourceId: + "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-000000000000/resourceGroups/xx-rg/providers/Microsoft.Kusto/Clusters/sampleKustoResource", + privateLinkResourceRegion: "West US", + privateLinkServiceUrl: "my-self-hosted-influxdb.westus.mydomain.com", + requestMessage: "Example Request Message", + }, + }, + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Create.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Create.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Create.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Delete.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Delete.js new file mode 100644 index 0000000000..5c9d092595 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Delete.js @@ -0,0 +1,15 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete a managed private endpoint for a grafana resource. + * + * @summary delete a managed private endpoint for a grafana resource. + * x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Delete.json + */ +async function managedPrivateEndpointDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + await client.managedPrivateEndpoints.delete("myResourceGroup", "myWorkspace", "myMPEName"); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Delete.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Delete.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Get.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Get.js new file mode 100644 index 0000000000..aa31c3622f --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Get.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get a specific managed private endpoint of a grafana resource. + * + * @summary get a specific managed private endpoint of a grafana resource. + * x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Get.json + */ +async function managedPrivateEndpointGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.get( + "myResourceGroup", + "myWorkspace", + "myMPEName", + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Get.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Get.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_List.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_List.js new file mode 100644 index 0000000000..18f6796c49 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_List.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all managed private endpoints of a grafana resource. + * + * @summary list all managed private endpoints of a grafana resource. + * x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_List.json + */ +async function managedPrivateEndpointList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.managedPrivateEndpoints.list("myResourceGroup", "myWorkspace")) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_List.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Patch.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Patch.js new file mode 100644 index 0000000000..123dd5da1f --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Patch.js @@ -0,0 +1,21 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update a managed private endpoint for an existing grafana resource. + * + * @summary update a managed private endpoint for an existing grafana resource. + * x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Patch.json + */ +async function managedPrivateEndpointsPatch() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.managedPrivateEndpoints.update( + "myResourceGroup", + "myWorkspace", + "myMPEName", + { tags: { Environment: "Dev 2" } }, + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Patch.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Patch.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Patch.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Refresh.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Refresh.js new file mode 100644 index 0000000000..7a63040faa --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Refresh.js @@ -0,0 +1,15 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to refresh and sync managed private endpoints of a grafana resource to latest state. + * + * @summary refresh and sync managed private endpoints of a grafana resource to latest state. + * x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Refresh.json + */ +async function managedPrivateEndpointRefresh() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + await client.managedPrivateEndpoints.refresh("myResourceGroup", "myWorkspace"); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Refresh.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Refresh.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/ManagedPrivateEndpoints_Refresh.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Operations_List.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Operations_List.js new file mode 100644 index 0000000000..0951b2aa3b --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Operations_List.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list the operations for the provider + * + * @summary list the operations for the provider + * x-ms-original-file: 2025-08-01/Operations_List.json + */ +async function operationsList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.operations.list()) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Operations_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Operations_List.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/Operations_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Approve.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Approve.js new file mode 100644 index 0000000000..e5a411a5da --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Approve.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to manual approve private endpoint connection + * + * @summary manual approve private endpoint connection + * x-ms-original-file: 2025-08-01/PrivateEndpointConnections_Approve.json + */ +async function privateEndpointConnectionsApprove() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnections.approve( + "myResourceGroup", + "myWorkspace", + "myConnection", + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Approve.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Approve.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Approve.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Delete.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Delete.js new file mode 100644 index 0000000000..2d61a19b05 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Delete.js @@ -0,0 +1,15 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete private endpoint connection + * + * @summary delete private endpoint connection + * x-ms-original-file: 2025-08-01/PrivateEndpointConnections_Delete.json + */ +async function privateEndpointConnectionsDelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + await client.privateEndpointConnections.delete("myResourceGroup", "myWorkspace", "myConnection"); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Delete.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Delete.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Get.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Get.js new file mode 100644 index 0000000000..85d755ce52 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Get.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get private endpoint connections. + * + * @summary get private endpoint connections. + * x-ms-original-file: 2025-08-01/PrivateEndpointConnections_Get.json + */ +async function privateEndpointConnectionsGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnections.get( + "myResourceGroup", + "myWorkspace", + "myConnection", + ); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Get.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_List.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_List.js new file mode 100644 index 0000000000..20e4eff423 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_List.js @@ -0,0 +1,23 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get private endpoint connection + * + * @summary get private endpoint connection + * x-ms-original-file: 2025-08-01/PrivateEndpointConnections_List.json + */ +async function privateEndpointConnectionsList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.privateEndpointConnections.list( + "myResourceGroup", + "myWorkspace", + )) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_List.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateEndpointConnections_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_Get.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_Get.js new file mode 100644 index 0000000000..ed757614a1 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_Get.js @@ -0,0 +1,16 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get specific private link resource information for this grafana resource + * + * @summary get specific private link resource information for this grafana resource + * x-ms-original-file: 2025-08-01/PrivateLinkResources_Get.json + */ +async function privateLinkResourcesGet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const result = await client.privateLinkResources.get("myResourceGroup", "myWorkspace", "grafana"); + console.log(result); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_Get.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_Get.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_Get.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_List.js b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_List.js new file mode 100644 index 0000000000..67b35318fc --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_List.js @@ -0,0 +1,20 @@ +const { DashboardManagementClient } = require("@azure/arm-dashboard"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all private link resources information for this grafana resource + * + * @summary list all private link resources information for this grafana resource + * x-ms-original-file: 2025-08-01/PrivateLinkResources_List.json + */ +async function privateLinkResourcesList() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new DashboardManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.privateLinkResources.list("myResourceGroup", "myWorkspace")) { + resArray.push(item); + } + + console.log(resArray); +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_List.json new file mode 100644 index 0000000000..6660caebf6 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/stable/2025-08-01/examples-js/PrivateLinkResources_List.json @@ -0,0 +1 @@ +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-dashboard_2.0.0/sdk/dashboard/arm-dashboard/README.md"} \ No newline at end of file