Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sdk/elastic/arm-elastic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 2.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 2.0.0 (2025-11-25)

### Features Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/elastic/arm-elastic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for MicrosoftElastic.",
"version": "2.0.0",
"version": "2.0.1",
"engines": {
"node": ">=20.0.0"
},
Expand Down
134 changes: 134 additions & 0 deletions sdk/elastic/arm-elastic/samples/v2/javascript/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to List all traffic filters associated with your Elastic monitor resource, helping you manage network traffic control.
*
* @summary List all traffic filters associated with your Elastic monitor resource, helping you manage network traffic control.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/AllTrafficFilters_list.json
*/
async function allTrafficFiltersList() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.allTrafficFilters.list(resourceGroupName, monitorName);
console.log(result);
}

async function main() {
await allTrafficFiltersList();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Associate a traffic filter with your Elastic monitor resource to control and manage network traffic.
*
* @summary Associate a traffic filter with your Elastic monitor resource to control and manage network traffic.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/AssociateTrafficFilter_Update.json
*/
async function associateTrafficFilterAssociate() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const rulesetId = "31d91b5afb6f4c2eaaf104c97b1991dd";
const options = { rulesetId };
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.associateTrafficFilter.beginAssociateAndWait(
resourceGroupName,
monitorName,
options,
);
console.log(result);
}

async function main() {
await associateTrafficFilterAssociate();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Retrieve marketplace and organization billing information mapped to the given Elastic monitor resource.
*
* @summary Retrieve marketplace and organization billing information mapped to the given Elastic monitor resource.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/BillingInfo_Get.json
*/
async function billingInfoGet() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.billingInfo.get(resourceGroupName, monitorName);
console.log(result);
}

async function main() {
await billingInfoGet();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to List all active deployments associated with the marketplace subscription linked to the given Elastic monitor resource.
*
* @summary List all active deployments associated with the marketplace subscription linked to the given Elastic monitor resource.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/ConnectedPartnerResources_List.json
*/
async function connectedPartnerResourcesList() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const resArray = new Array();
for await (const item of client.connectedPartnerResources.list(resourceGroupName, monitorName)) {
resArray.push(item);
}
console.log(resArray);
}

async function main() {
await connectedPartnerResourcesList();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Create and associate an IP filter with your Elastic monitor resource to control and manage network traffic.
*
* @summary Create and associate an IP filter with your Elastic monitor resource to control and manage network traffic.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/IPTrafficFilter_Create.json
*/
async function createAndAssociateIPFilterCreate() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const ips = "192.168.131.0, 192.168.132.6/22";
const options = { ips };
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.createAndAssociateIPFilter.beginCreateAndWait(
resourceGroupName,
monitorName,
options,
);
console.log(result);
}

async function main() {
await createAndAssociateIPFilterCreate();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Create and associate a PL filter with your Elastic monitor resource to control and manage network traffic.
*
* @summary Create and associate a PL filter with your Elastic monitor resource to control and manage network traffic.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/PrivateLinkTrafficFilters_Create.json
*/
async function createAndAssociatePlFilterCreate() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const privateEndpointGuid = "fdb54d3b-e85e-4d08-8958-0d2f7g523df9";
const privateEndpointName = "myPrivateEndpoint";
const options = {
privateEndpointGuid,
privateEndpointName,
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.createAndAssociatePLFilter.beginCreateAndWait(
resourceGroupName,
monitorName,
options,
);
console.log(result);
}

async function main() {
await createAndAssociatePlFilterCreate();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Fetch detailed information about Elastic cloud deployments corresponding to the Elastic monitor resource.
*
* @summary Fetch detailed information about Elastic cloud deployments corresponding to the Elastic monitor resource.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/DeploymentInfo_List.json
*/
async function deploymentInfoList() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.deploymentInfo.list(resourceGroupName, monitorName);
console.log(result);
}

async function main() {
await deploymentInfoList();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Detach and delete an existing traffic filter from your Elastic monitor resource, removing its network traffic control capabilities.
*
* @summary Detach and delete an existing traffic filter from your Elastic monitor resource, removing its network traffic control capabilities.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/DetachAndDeleteTrafficFilter_Delete.json
*/
async function detachAndDeleteTrafficFilterDelete() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const rulesetId = "31d91b5afb6f4c2eaaf104c97b1991dd";
const options = {
rulesetId,
};
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.detachAndDeleteTrafficFilter.delete(
resourceGroupName,
monitorName,
options,
);
console.log(result);
}

async function main() {
await detachAndDeleteTrafficFilterDelete();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Detach an existing traffic filter from your Elastic monitor resource, removing its network traffic control capabilities.
*
* @summary Detach an existing traffic filter from your Elastic monitor resource, removing its network traffic control capabilities.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/DetachTrafficFilters_Update.json
*/
async function detachTrafficFilterUpdate() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const rulesetId = "31d91b5afb6f4c2eaaf104c97b1991dd";
const options = { rulesetId };
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.detachTrafficFilter.beginUpdateAndWait(
resourceGroupName,
monitorName,
options,
);
console.log(result);
}

async function main() {
await detachTrafficFilterUpdate();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Retrieve a list of all available Elastic versions for a specified region, helping you choose the best version for your deployment.
*
* @summary Retrieve a list of all available Elastic versions for a specified region, helping you choose the best version for your deployment.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/ElasticVersions_List.json
*/
async function elasticVersionsList() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const region = "myregion";
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const resArray = new Array();
for await (const item of client.elasticVersions.list(region)) {
resArray.push(item);
}
console.log(resArray);
}

async function main() {
await elasticVersionsList();
}

main().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

const { MicrosoftElastic } = require("@azure/arm-elastic");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");

/**
* This sample demonstrates how to Create or update external user configurations for your Elastic monitor resource, enabling access and management by external users.
*
* @summary Create or update external user configurations for your Elastic monitor resource, enabling access and management by external users.
* x-ms-original-file: specification/elastic/resource-manager/Microsoft.Elastic/stable/2025-06-01/examples/ExternalUserInfo.json
*/
async function externalUserCreateOrUpdate() {
const subscriptionId =
process.env["ELASTIC_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["ELASTIC_RESOURCE_GROUP"] || "myResourceGroup";
const monitorName = "myMonitor";
const credential = new DefaultAzureCredential();
const client = new MicrosoftElastic(credential, subscriptionId);
const result = await client.externalUser.createOrUpdate(resourceGroupName, monitorName);
console.log(result);
}

async function main() {
await externalUserCreateOrUpdate();
}

main().catch(console.error);
Loading
Loading