[mgmt] elasticsan release (#31473)
https://github.com/Azure/sdk-release-request/issues/5601?reload=1
This commit is contained in:
Родитель
afd53e1d1e
Коммит
b4d6e5a0f1
|
@ -1,5 +1,18 @@
|
|||
# Release History
|
||||
|
||||
## 1.2.0-beta.1 (2024-10-18)
|
||||
Compared with version 1.1.0
|
||||
|
||||
### Features Added
|
||||
|
||||
- Added Interface AutoScaleProperties
|
||||
- Added Interface ScaleUpProperties
|
||||
- Added Type Alias AutoScalePolicyEnforcement
|
||||
- Interface ElasticSanProperties has a new optional parameter autoScaleProperties
|
||||
- Interface ElasticSanUpdateProperties has a new optional parameter autoScaleProperties
|
||||
- Added Enum KnownAutoScalePolicyEnforcement
|
||||
|
||||
|
||||
## 1.1.0 (2024-08-12)
|
||||
|
||||
### Features Added
|
||||
|
|
|
@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
|
|||
|
||||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan) |
|
||||
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-elasticsan) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview) |
|
||||
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
||||
|
||||
## Getting started
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"commit": "572fbc80c94ad3ae14d15e20c44a4f3407a2fed2",
|
||||
"commit": "abe3209e7c6924a58ab560ebab2349bc8fde6aa7",
|
||||
"readme": "specification/elasticsan/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\elasticsan\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true",
|
||||
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\elasticsan\\resource-manager\\readme.md --use=@autorest/typescript@6.0.27 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.11",
|
||||
"use": "@autorest/typescript@6.0.23"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.15",
|
||||
"use": "@autorest/typescript@6.0.27"
|
||||
}
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "js",
|
||||
"TagPrefix": "js/elasticsans/arm-elasticsan",
|
||||
"Tag": "js/elasticsans/arm-elasticsan_92f92d19cb"
|
||||
"Tag": "js/elasticsans/arm-elasticsan_6228846489"
|
||||
}
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for ElasticSanManagement.",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0-beta.1",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-auth": "^1.6.0",
|
||||
"@azure/core-client": "^1.7.0",
|
||||
"@azure/core-lro": "^2.5.4",
|
||||
"@azure/abort-controller": "^2.1.2",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.7.0",
|
||||
"@azure/core-auth": "^1.6.0",
|
||||
"@azure/core-rest-pipeline": "^1.14.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
|
@ -28,21 +28,21 @@
|
|||
"module": "./dist-esm/src/index.js",
|
||||
"types": "./types/arm-elasticsan.d.ts",
|
||||
"devDependencies": {
|
||||
"@azure-tools/test-credential": "^1.1.0",
|
||||
"@azure-tools/test-recorder": "^3.0.0",
|
||||
"typescript": "~5.6.2",
|
||||
"uglify-js": "^3.4.9",
|
||||
"dotenv": "^16.0.0",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"@azure/identity": "^4.0.1",
|
||||
"@types/chai": "^4.2.8",
|
||||
"@azure/identity": "^4.2.1",
|
||||
"@azure-tools/test-recorder": "^3.0.0",
|
||||
"@azure-tools/test-credential": "^1.1.0",
|
||||
"mocha": "^10.0.0",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"tsx": "^4.7.1",
|
||||
"@types/chai": "^4.2.8",
|
||||
"chai": "^4.2.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"dotenv": "^16.0.0",
|
||||
"mocha": "^10.0.0",
|
||||
"ts-node": "^10.0.0",
|
||||
"tsx": "^4.7.1",
|
||||
"typescript": "~5.6.2",
|
||||
"uglify-js": "^3.4.9"
|
||||
"@types/node": "^18.0.0",
|
||||
"ts-node": "^10.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -70,29 +70,28 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api",
|
||||
"build:browser": "echo skipped",
|
||||
"build:node": "echo skipped",
|
||||
"build:samples": "echo skipped.",
|
||||
"build:test": "echo skipped",
|
||||
"check-format": "echo skipped",
|
||||
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
||||
"execute:samples": "echo skipped",
|
||||
"extract-api": "dev-tool run extract-api",
|
||||
"format": "echo skipped",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"integration-test:browser": "echo skipped",
|
||||
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
||||
"lint": "echo skipped",
|
||||
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
||||
"pack": "npm pack 2>&1",
|
||||
"prepack": "npm run build",
|
||||
"pack": "npm pack 2>&1",
|
||||
"extract-api": "dev-tool run extract-api",
|
||||
"lint": "echo skipped",
|
||||
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
||||
"build:node": "echo skipped",
|
||||
"build:browser": "echo skipped",
|
||||
"build:test": "echo skipped",
|
||||
"build:samples": "echo skipped.",
|
||||
"check-format": "echo skipped",
|
||||
"execute:samples": "echo skipped",
|
||||
"format": "echo skipped",
|
||||
"test": "npm run integration-test",
|
||||
"test:browser": "echo skipped",
|
||||
"test:node": "echo skipped",
|
||||
"test:browser": "echo skipped",
|
||||
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
||||
"unit-test:browser": "echo skipped",
|
||||
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
|
||||
"update-snippets": "echo skipped"
|
||||
"unit-test:browser": "echo skipped",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
||||
"integration-test:browser": "echo skipped"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"//metadata": {
|
||||
|
|
|
@ -16,6 +16,14 @@ export type Action = string;
|
|||
// @public
|
||||
export type ActionType = string;
|
||||
|
||||
// @public
|
||||
export type AutoScalePolicyEnforcement = string;
|
||||
|
||||
// @public
|
||||
export interface AutoScaleProperties {
|
||||
scaleUpProperties?: ScaleUpProperties;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type CreatedByType = string;
|
||||
|
||||
|
@ -66,6 +74,7 @@ export interface ElasticSanManagementOptionalParams extends coreClient.ServiceCl
|
|||
|
||||
// @public
|
||||
export interface ElasticSanProperties {
|
||||
autoScaleProperties?: AutoScaleProperties;
|
||||
availabilityZones?: string[];
|
||||
baseSizeTiB: number;
|
||||
extendedCapacitySizeTiB: number;
|
||||
|
@ -174,6 +183,7 @@ export interface ElasticSanUpdate {
|
|||
|
||||
// @public
|
||||
export interface ElasticSanUpdateProperties {
|
||||
autoScaleProperties?: AutoScaleProperties;
|
||||
baseSizeTiB?: number;
|
||||
extendedCapacitySizeTiB?: number;
|
||||
publicNetworkAccess?: PublicNetworkAccess;
|
||||
|
@ -258,6 +268,13 @@ export enum KnownActionType {
|
|||
Internal = "Internal"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownAutoScalePolicyEnforcement {
|
||||
Disabled = "Disabled",
|
||||
Enabled = "Enabled",
|
||||
None = "None"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownCreatedByType {
|
||||
Application = "Application",
|
||||
|
@ -540,6 +557,14 @@ export interface Resource {
|
|||
readonly type?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ScaleUpProperties {
|
||||
autoScalePolicyEnforcement?: AutoScalePolicyEnforcement;
|
||||
capacityUnitScaleUpLimitTiB?: number;
|
||||
increaseCapacityUnitByTiB?: number;
|
||||
unusedSizeTiB?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Sku {
|
||||
name: SkuName;
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create ElasticSan.
|
||||
*
|
||||
* @summary Create ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Create_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -29,13 +29,21 @@ async function elasticSansCreateMaximumSetGen() {
|
|||
const parameters: ElasticSan = {
|
||||
location: "France Central",
|
||||
properties: {
|
||||
availabilityZones: ["1"],
|
||||
baseSizeTiB: 5,
|
||||
extendedCapacitySizeTiB: 25,
|
||||
autoScaleProperties: {
|
||||
scaleUpProperties: {
|
||||
autoScalePolicyEnforcement: "None",
|
||||
capacityUnitScaleUpLimitTiB: 17,
|
||||
increaseCapacityUnitByTiB: 4,
|
||||
unusedSizeTiB: 24,
|
||||
},
|
||||
},
|
||||
availabilityZones: ["xoz"],
|
||||
baseSizeTiB: 1,
|
||||
extendedCapacitySizeTiB: 3,
|
||||
publicNetworkAccess: "Enabled",
|
||||
sku: { name: "Premium_LRS", tier: "Premium" },
|
||||
},
|
||||
tags: { key9316: "ihndtieqibtob" },
|
||||
tags: { key9706: "haitqqakcntcpalkzqmjmcnifnhd" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
|
@ -51,7 +59,7 @@ async function elasticSansCreateMaximumSetGen() {
|
|||
* This sample demonstrates how to Create ElasticSan.
|
||||
*
|
||||
* @summary Create ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Create_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -62,8 +70,8 @@ async function elasticSansCreateMinimumSetGen() {
|
|||
const parameters: ElasticSan = {
|
||||
location: "France Central",
|
||||
properties: {
|
||||
baseSizeTiB: 15,
|
||||
extendedCapacitySizeTiB: 27,
|
||||
baseSizeTiB: 1,
|
||||
extendedCapacitySizeTiB: 3,
|
||||
sku: { name: "Premium_LRS" },
|
||||
},
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Elastic San.
|
||||
*
|
||||
* @summary Delete a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Delete_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -39,7 +39,7 @@ async function elasticSansDeleteMaximumSetGen() {
|
|||
* This sample demonstrates how to Delete a Elastic San.
|
||||
*
|
||||
* @summary Delete a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Delete_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a ElasticSan.
|
||||
*
|
||||
* @summary Get a ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -39,7 +39,7 @@ async function elasticSansGetMaximumSetGen() {
|
|||
* This sample demonstrates how to Get a ElasticSan.
|
||||
*
|
||||
* @summary Get a ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Get_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a list of ElasticSan in a resource group.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan in a resource group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListByResourceGroupMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -40,7 +40,7 @@ async function elasticSansListByResourceGroupMaximumSetGen() {
|
|||
* This sample demonstrates how to Gets a list of ElasticSan in a resource group.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan in a resource group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListByResourceGroupMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a list of ElasticSans in a subscription
|
||||
*
|
||||
* @summary Gets a list of ElasticSans in a subscription
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListBySubscriptionMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function elasticSansListBySubscriptionMaximumSetGen() {
|
|||
* This sample demonstrates how to Gets a list of ElasticSans in a subscription
|
||||
*
|
||||
* @summary Gets a list of ElasticSans in a subscription
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListBySubscriptionMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Update a Elastic San.
|
||||
*
|
||||
* @summary Update a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Update_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansUpdateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -28,11 +28,19 @@ async function elasticSansUpdateMaximumSetGen() {
|
|||
const elasticSanName = "elasticsanname";
|
||||
const parameters: ElasticSanUpdate = {
|
||||
properties: {
|
||||
baseSizeTiB: 13,
|
||||
extendedCapacitySizeTiB: 29,
|
||||
autoScaleProperties: {
|
||||
scaleUpProperties: {
|
||||
autoScalePolicyEnforcement: "None",
|
||||
capacityUnitScaleUpLimitTiB: 17,
|
||||
increaseCapacityUnitByTiB: 4,
|
||||
unusedSizeTiB: 24,
|
||||
},
|
||||
},
|
||||
baseSizeTiB: 21,
|
||||
extendedCapacitySizeTiB: 10,
|
||||
publicNetworkAccess: "Enabled",
|
||||
},
|
||||
tags: { key1931: "yhjwkgmrrwrcoxblgwgzjqusch" },
|
||||
tags: { key5945: "eufqmxresekerilkgvfzddolxzas" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
|
@ -48,7 +56,7 @@ async function elasticSansUpdateMaximumSetGen() {
|
|||
* This sample demonstrates how to Update a Elastic San.
|
||||
*
|
||||
* @summary Update a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/ElasticSans_Update_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansUpdateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets a list of ElasticSan operations.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan operations.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Operations_List_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function operationsListMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -37,7 +37,7 @@ async function operationsListMaximumSetGen() {
|
|||
* This sample demonstrates how to Gets a list of ElasticSan operations.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan operations.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Operations_List_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function operationsListMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Update the state of specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -56,7 +56,7 @@ async function privateEndpointConnectionsCreateMaximumSetGen() {
|
|||
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Update the state of specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Deletes the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -41,7 +41,7 @@ async function privateEndpointConnectionsDeleteMaximumSetGen() {
|
|||
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Deletes the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Gets the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -41,7 +41,7 @@ async function privateEndpointConnectionsGetMaximumSetGen() {
|
|||
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Gets the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San.
|
||||
*
|
||||
* @summary List all Private Endpoint Connections associated with the Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsListMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -42,7 +42,7 @@ async function privateEndpointConnectionsListMaximumSetGen() {
|
|||
* This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San.
|
||||
*
|
||||
* @summary List all Private Endpoint Connections associated with the Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsListMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Gets the private link resources that need to be created for a elastic San.
|
||||
*
|
||||
* @summary Gets the private link resources that need to be created for a elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateLinkResourcesListByElasticSanMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -39,7 +39,7 @@ async function privateLinkResourcesListByElasticSanMaximumSetGen() {
|
|||
* This sample demonstrates how to Gets the private link resources that need to be created for a elastic San.
|
||||
*
|
||||
* @summary Gets the private link resources that need to be created for a elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateLinkResourcesListByElasticSanMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List all the available Skus in the region and information related to them
|
||||
*
|
||||
* @summary List all the available Skus in the region and information related to them
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Skus_List_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function skusListMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -41,7 +41,7 @@ async function skusListMaximumSetGen() {
|
|||
* This sample demonstrates how to List all the available Skus in the region and information related to them
|
||||
*
|
||||
* @summary List all the available Skus in the region and information related to them
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Skus_List_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function skusListMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create a Volume Group.
|
||||
*
|
||||
* @summary Create a Volume Group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Create_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -68,7 +68,7 @@ async function volumeGroupsCreateMaximumSetGen() {
|
|||
* This sample demonstrates how to Create a Volume Group.
|
||||
*
|
||||
* @summary Create a Volume Group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Create_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete an VolumeGroup.
|
||||
*
|
||||
* @summary Delete an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Delete_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -41,7 +41,7 @@ async function volumeGroupsDeleteMaximumSetGen() {
|
|||
* This sample demonstrates how to Delete an VolumeGroup.
|
||||
*
|
||||
* @summary Delete an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Delete_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get an VolumeGroups.
|
||||
*
|
||||
* @summary Get an VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -41,7 +41,7 @@ async function volumeGroupsGetMaximumSetGen() {
|
|||
* This sample demonstrates how to Get an VolumeGroups.
|
||||
*
|
||||
* @summary Get an VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Get_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List VolumeGroups.
|
||||
*
|
||||
* @summary List VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsListByElasticSanMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -42,7 +42,7 @@ async function volumeGroupsListByElasticSanMaximumSetGen() {
|
|||
* This sample demonstrates how to List VolumeGroups.
|
||||
*
|
||||
* @summary List VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsListByElasticSanMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Update an VolumeGroup.
|
||||
*
|
||||
* @summary Update an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Update_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsUpdateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -68,7 +68,7 @@ async function volumeGroupsUpdateMaximumSetGen() {
|
|||
* This sample demonstrates how to Update an VolumeGroup.
|
||||
*
|
||||
* @summary Update an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeGroups_Update_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsUpdateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create a Volume Snapshot.
|
||||
*
|
||||
* @summary Create a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Create_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -52,7 +52,7 @@ async function volumeSnapshotsCreateMaximumSetGen() {
|
|||
* This sample demonstrates how to Create a Volume Snapshot.
|
||||
*
|
||||
* @summary Create a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Create_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Volume Snapshot.
|
||||
*
|
||||
* @summary Delete a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -43,7 +43,7 @@ async function volumeSnapshotsDeleteMaximumSetGen() {
|
|||
* This sample demonstrates how to Delete a Volume Snapshot.
|
||||
*
|
||||
* @summary Delete a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Volume Snapshot.
|
||||
*
|
||||
* @summary Get a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -43,7 +43,7 @@ async function volumeSnapshotsGetMaximumSetGen() {
|
|||
* This sample demonstrates how to Get a Volume Snapshot.
|
||||
*
|
||||
* @summary Get a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_Get_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
*
|
||||
* @summary List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsListByVolumeGroupMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -50,7 +50,7 @@ async function volumeSnapshotsListByVolumeGroupMaximumSetGen() {
|
|||
* This sample demonstrates how to List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
*
|
||||
* @summary List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsListByVolumeGroupMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create a Volume.
|
||||
*
|
||||
* @summary Create a Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Create_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -51,7 +51,7 @@ async function volumesCreateMaximumSetGen() {
|
|||
* This sample demonstrates how to Create a Volume.
|
||||
*
|
||||
* @summary Create a Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Create_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete an Volume.
|
||||
*
|
||||
* @summary Delete an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Delete_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -53,7 +53,7 @@ async function volumesDeleteMaximumSetGen() {
|
|||
* This sample demonstrates how to Delete an Volume.
|
||||
*
|
||||
* @summary Delete an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Delete_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get an Volume.
|
||||
*
|
||||
* @summary Get an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -43,7 +43,7 @@ async function volumesGetMaximumSetGen() {
|
|||
* This sample demonstrates how to Get an Volume.
|
||||
*
|
||||
* @summary Get an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Get_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List Volumes in a VolumeGroup.
|
||||
*
|
||||
* @summary List Volumes in a VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesListByVolumeGroupMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -44,7 +44,7 @@ async function volumesListByVolumeGroupMaximumSetGen() {
|
|||
* This sample demonstrates how to List Volumes in a VolumeGroup.
|
||||
*
|
||||
* @summary List Volumes in a VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesListByVolumeGroupMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Update an Volume.
|
||||
*
|
||||
* @summary Update an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Update_MaximumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesUpdateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
|
@ -45,7 +45,7 @@ async function volumesUpdateMaximumSetGen() {
|
|||
* This sample demonstrates how to Update an Volume.
|
||||
*
|
||||
* @summary Update an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/examples/Volumes_Update_MinimumSet_Gen.json
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesUpdateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
# client library samples for JavaScript (Beta)
|
||||
|
||||
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [elasticSansCreateSample.js][elasticsanscreatesample] | Create ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json |
|
||||
| [elasticSansDeleteSample.js][elasticsansdeletesample] | Delete a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json |
|
||||
| [elasticSansGetSample.js][elasticsansgetsample] | Get a ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json |
|
||||
| [elasticSansListByResourceGroupSample.js][elasticsanslistbyresourcegroupsample] | Gets a list of ElasticSan in a resource group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json |
|
||||
| [elasticSansListBySubscriptionSample.js][elasticsanslistbysubscriptionsample] | Gets a list of ElasticSans in a subscription x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json |
|
||||
| [elasticSansUpdateSample.js][elasticsansupdatesample] | Update a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json |
|
||||
| [operationsListSample.js][operationslistsample] | Gets a list of ElasticSan operations. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsCreateSample.js][privateendpointconnectionscreatesample] | Update the state of specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | List all Private Endpoint Connections associated with the Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json |
|
||||
| [privateLinkResourcesListByElasticSanSample.js][privatelinkresourceslistbyelasticsansample] | Gets the private link resources that need to be created for a elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json |
|
||||
| [skusListSample.js][skuslistsample] | List all the available Skus in the region and information related to them x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MaximumSet_Gen.json |
|
||||
| [volumeGroupsCreateSample.js][volumegroupscreatesample] | Create a Volume Group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json |
|
||||
| [volumeGroupsDeleteSample.js][volumegroupsdeletesample] | Delete an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json |
|
||||
| [volumeGroupsGetSample.js][volumegroupsgetsample] | Get an VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json |
|
||||
| [volumeGroupsListByElasticSanSample.js][volumegroupslistbyelasticsansample] | List VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json |
|
||||
| [volumeGroupsUpdateSample.js][volumegroupsupdatesample] | Update an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsCreateSample.js][volumesnapshotscreatesample] | Create a Volume Snapshot. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsDeleteSample.js][volumesnapshotsdeletesample] | Delete a Volume Snapshot. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsGetSample.js][volumesnapshotsgetsample] | Get a Volume Snapshot. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsListByVolumeGroupSample.js][volumesnapshotslistbyvolumegroupsample] | List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json |
|
||||
| [volumesCreateSample.js][volumescreatesample] | Create a Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MaximumSet_Gen.json |
|
||||
| [volumesDeleteSample.js][volumesdeletesample] | Delete an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json |
|
||||
| [volumesGetSample.js][volumesgetsample] | Get an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json |
|
||||
| [volumesListByVolumeGroupSample.js][volumeslistbyvolumegroupsample] | List Volumes in a VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json |
|
||||
| [volumesUpdateSample.js][volumesupdatesample] | Update an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MaximumSet_Gen.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node elasticSansCreateSample.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env ELASTICSANS_SUBSCRIPTION_ID="<elasticsans subscription id>" ELASTICSANS_RESOURCE_GROUP="<elasticsans resource group>" node elasticSansCreateSample.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[elasticsanscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansCreateSample.js
|
||||
[elasticsansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansDeleteSample.js
|
||||
[elasticsansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansGetSample.js
|
||||
[elasticsanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListByResourceGroupSample.js
|
||||
[elasticsanslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansListBySubscriptionSample.js
|
||||
[elasticsansupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/elasticSansUpdateSample.js
|
||||
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/operationsListSample.js
|
||||
[privateendpointconnectionscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsCreateSample.js
|
||||
[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsDeleteSample.js
|
||||
[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsGetSample.js
|
||||
[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateEndpointConnectionsListSample.js
|
||||
[privatelinkresourceslistbyelasticsansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/privateLinkResourcesListByElasticSanSample.js
|
||||
[skuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/skusListSample.js
|
||||
[volumegroupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsCreateSample.js
|
||||
[volumegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsDeleteSample.js
|
||||
[volumegroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsGetSample.js
|
||||
[volumegroupslistbyelasticsansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsListByElasticSanSample.js
|
||||
[volumegroupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeGroupsUpdateSample.js
|
||||
[volumesnapshotscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeSnapshotsCreateSample.js
|
||||
[volumesnapshotsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeSnapshotsDeleteSample.js
|
||||
[volumesnapshotsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeSnapshotsGetSample.js
|
||||
[volumesnapshotslistbyvolumegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumeSnapshotsListByVolumeGroupSample.js
|
||||
[volumescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesCreateSample.js
|
||||
[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesDeleteSample.js
|
||||
[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesGetSample.js
|
||||
[volumeslistbyvolumegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesListByVolumeGroupSample.js
|
||||
[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/javascript/volumesUpdateSample.js
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan/README.md
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create ElasticSan.
|
||||
*
|
||||
* @summary Create ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansCreateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters = {
|
||||
location: "France Central",
|
||||
properties: {
|
||||
autoScaleProperties: {
|
||||
scaleUpProperties: {
|
||||
autoScalePolicyEnforcement: "None",
|
||||
capacityUnitScaleUpLimitTiB: 17,
|
||||
increaseCapacityUnitByTiB: 4,
|
||||
unusedSizeTiB: 24,
|
||||
},
|
||||
},
|
||||
availabilityZones: ["xoz"],
|
||||
baseSizeTiB: 1,
|
||||
extendedCapacitySizeTiB: 3,
|
||||
publicNetworkAccess: "Enabled",
|
||||
sku: { name: "Premium_LRS", tier: "Premium" },
|
||||
},
|
||||
tags: { key9706: "haitqqakcntcpalkzqmjmcnifnhd" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create ElasticSan.
|
||||
*
|
||||
* @summary Create ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansCreateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters = {
|
||||
location: "France Central",
|
||||
properties: {
|
||||
baseSizeTiB: 1,
|
||||
extendedCapacitySizeTiB: 3,
|
||||
sku: { name: "Premium_LRS" },
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansCreateMaximumSetGen();
|
||||
elasticSansCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Elastic San.
|
||||
*
|
||||
* @summary Delete a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansDeleteMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginDeleteAndWait(resourceGroupName, elasticSanName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Elastic San.
|
||||
*
|
||||
* @summary Delete a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansDeleteMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginDeleteAndWait(resourceGroupName, elasticSanName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansDeleteMaximumSetGen();
|
||||
elasticSansDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a ElasticSan.
|
||||
*
|
||||
* @summary Get a ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansGetMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.get(resourceGroupName, elasticSanName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a ElasticSan.
|
||||
*
|
||||
* @summary Get a ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansGetMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.get(resourceGroupName, elasticSanName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansGetMaximumSetGen();
|
||||
elasticSansGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan in a resource group.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan in a resource group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListByResourceGroupMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan in a resource group.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan in a resource group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListByResourceGroupMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansListByResourceGroupMaximumSetGen();
|
||||
elasticSansListByResourceGroupMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSans in a subscription
|
||||
*
|
||||
* @summary Gets a list of ElasticSans in a subscription
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListBySubscriptionMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSans in a subscription
|
||||
*
|
||||
* @summary Gets a list of ElasticSans in a subscription
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListBySubscriptionMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansListBySubscriptionMaximumSetGen();
|
||||
elasticSansListBySubscriptionMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a Elastic San.
|
||||
*
|
||||
* @summary Update a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansUpdateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters = {
|
||||
properties: {
|
||||
autoScaleProperties: {
|
||||
scaleUpProperties: {
|
||||
autoScalePolicyEnforcement: "None",
|
||||
capacityUnitScaleUpLimitTiB: 17,
|
||||
increaseCapacityUnitByTiB: 4,
|
||||
unusedSizeTiB: 24,
|
||||
},
|
||||
},
|
||||
baseSizeTiB: 21,
|
||||
extendedCapacitySizeTiB: 10,
|
||||
publicNetworkAccess: "Enabled",
|
||||
},
|
||||
tags: { key5945: "eufqmxresekerilkgvfzddolxzas" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a Elastic San.
|
||||
*
|
||||
* @summary Update a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansUpdateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansUpdateMaximumSetGen();
|
||||
elasticSansUpdateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan operations.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan operations.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function operationsListMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan operations.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan operations.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function operationsListMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
operationsListMaximumSetGen();
|
||||
operationsListMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-elasticsan-js-beta",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for JavaScript (Beta)",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||
"directory": "sdk/elasticsans/arm-elasticsan"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"typescript",
|
||||
"browser",
|
||||
"isomorphic"
|
||||
],
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan",
|
||||
"dependencies": {
|
||||
"@azure/arm-elasticsan": "next",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^4.2.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Update the state of specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsCreateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const parameters = {
|
||||
properties: {
|
||||
groupIds: ["jdwrzpemdjrpiwzvy"],
|
||||
privateEndpoint: {},
|
||||
privateLinkServiceConnectionState: {
|
||||
description: "dxl",
|
||||
actionsRequired: "jhjdpwvyzipggtn",
|
||||
status: "Pending",
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Update the state of specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsCreateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const parameters = {
|
||||
properties: { privateLinkServiceConnectionState: {} },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsCreateMaximumSetGen();
|
||||
privateEndpointConnectionsCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Deletes the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDeleteMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Deletes the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDeleteMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsDeleteMaximumSetGen();
|
||||
privateEndpointConnectionsDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Gets the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGetMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Gets the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGetMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsGetMaximumSetGen();
|
||||
privateEndpointConnectionsGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San.
|
||||
*
|
||||
* @summary List all Private Endpoint Connections associated with the Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsListMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateEndpointConnections.list(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San.
|
||||
*
|
||||
* @summary List all Private Endpoint Connections associated with the Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsListMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateEndpointConnections.list(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsListMaximumSetGen();
|
||||
privateEndpointConnectionsListMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the private link resources that need to be created for a elastic San.
|
||||
*
|
||||
* @summary Gets the private link resources that need to be created for a elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateLinkResourcesListByElasticSanMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateLinkResources.listByElasticSan(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the private link resources that need to be created for a elastic San.
|
||||
*
|
||||
* @summary Gets the private link resources that need to be created for a elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateLinkResourcesListByElasticSanMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateLinkResources.listByElasticSan(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateLinkResourcesListByElasticSanMaximumSetGen();
|
||||
privateLinkResourcesListByElasticSanMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all the available Skus in the region and information related to them
|
||||
*
|
||||
* @summary List all the available Skus in the region and information related to them
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function skusListMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const filter = "obwwdrkq";
|
||||
const options = { filter };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.skus.list(options)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all the available Skus in the region and information related to them
|
||||
*
|
||||
* @summary List all the available Skus in the region and information related to them
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function skusListMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.skus.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
skusListMaximumSetGen();
|
||||
skusListMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Group.
|
||||
*
|
||||
* @summary Create a Volume Group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsCreateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters = {
|
||||
identity: { type: "None", userAssignedIdentities: { key1006: {} } },
|
||||
properties: {
|
||||
encryption: "EncryptionAtRestWithPlatformKey",
|
||||
encryptionProperties: {
|
||||
encryptionIdentity: {
|
||||
encryptionUserAssignedIdentity: "gfhkfbozahmmwluqndfgxunssafa",
|
||||
},
|
||||
keyVaultProperties: {
|
||||
keyName: "lunpapamzeimppgobraxjt",
|
||||
keyVaultUri: "https://microsoft.com/a",
|
||||
keyVersion: "oemygbnfmqhijmonkqfqmy",
|
||||
},
|
||||
},
|
||||
enforceDataIntegrityCheckForIscsi: true,
|
||||
networkAcls: {
|
||||
virtualNetworkRules: [
|
||||
{
|
||||
action: "Allow",
|
||||
virtualNetworkResourceId: "bkhwaiqvvaguymsmnzzbzz",
|
||||
},
|
||||
],
|
||||
},
|
||||
protocolType: "Iscsi",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Group.
|
||||
*
|
||||
* @summary Create a Volume Group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsCreateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsCreateMaximumSetGen();
|
||||
volumeGroupsCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an VolumeGroup.
|
||||
*
|
||||
* @summary Delete an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsDeleteMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an VolumeGroup.
|
||||
*
|
||||
* @summary Delete an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsDeleteMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsDeleteMaximumSetGen();
|
||||
volumeGroupsDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an VolumeGroups.
|
||||
*
|
||||
* @summary Get an VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsGetMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.get(resourceGroupName, elasticSanName, volumeGroupName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an VolumeGroups.
|
||||
*
|
||||
* @summary Get an VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsGetMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.get(resourceGroupName, elasticSanName, volumeGroupName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsGetMaximumSetGen();
|
||||
volumeGroupsGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List VolumeGroups.
|
||||
*
|
||||
* @summary List VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsListByElasticSanMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeGroups.listByElasticSan(resourceGroupName, elasticSanName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List VolumeGroups.
|
||||
*
|
||||
* @summary List VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsListByElasticSanMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeGroups.listByElasticSan(resourceGroupName, elasticSanName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsListByElasticSanMaximumSetGen();
|
||||
volumeGroupsListByElasticSanMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an VolumeGroup.
|
||||
*
|
||||
* @summary Update an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsUpdateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters = {
|
||||
identity: { type: "None", userAssignedIdentities: { key1006: {} } },
|
||||
properties: {
|
||||
encryption: "EncryptionAtRestWithPlatformKey",
|
||||
encryptionProperties: {
|
||||
encryptionIdentity: {
|
||||
encryptionUserAssignedIdentity: "gfhkfbozahmmwluqndfgxunssafa",
|
||||
},
|
||||
keyVaultProperties: {
|
||||
keyName: "lunpapamzeimppgobraxjt",
|
||||
keyVaultUri: "https://microsoft.com/a",
|
||||
keyVersion: "oemygbnfmqhijmonkqfqmy",
|
||||
},
|
||||
},
|
||||
enforceDataIntegrityCheckForIscsi: true,
|
||||
networkAcls: {
|
||||
virtualNetworkRules: [
|
||||
{
|
||||
action: "Allow",
|
||||
virtualNetworkResourceId: "bkhwaiqvvaguymsmnzzbzz",
|
||||
},
|
||||
],
|
||||
},
|
||||
protocolType: "Iscsi",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an VolumeGroup.
|
||||
*
|
||||
* @summary Update an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsUpdateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsUpdateMaximumSetGen();
|
||||
volumeGroupsUpdateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Snapshot.
|
||||
*
|
||||
* @summary Create a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsCreateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const parameters = {
|
||||
properties: {
|
||||
creationData: {
|
||||
sourceId:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Snapshot.
|
||||
*
|
||||
* @summary Create a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsCreateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const parameters = {
|
||||
properties: {
|
||||
creationData: {
|
||||
sourceId:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsCreateMaximumSetGen();
|
||||
volumeSnapshotsCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Volume Snapshot.
|
||||
*
|
||||
* @summary Delete a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsDeleteMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Volume Snapshot.
|
||||
*
|
||||
* @summary Delete a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsDeleteMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsDeleteMaximumSetGen();
|
||||
volumeSnapshotsDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a Volume Snapshot.
|
||||
*
|
||||
* @summary Get a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsGetMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a Volume Snapshot.
|
||||
*
|
||||
* @summary Get a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsGetMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsGetMaximumSetGen();
|
||||
volumeSnapshotsGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
*
|
||||
* @summary List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsListByVolumeGroupMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const filter = "volumeName eq <volume name>";
|
||||
const options = { filter };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeSnapshots.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
options,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
*
|
||||
* @summary List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsListByVolumeGroupMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeSnapshots.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsListByVolumeGroupMaximumSetGen();
|
||||
volumeSnapshotsListByVolumeGroupMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume.
|
||||
*
|
||||
* @summary Create a Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesCreateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters = {
|
||||
properties: {
|
||||
creationData: { createSource: "None", sourceId: "ARM Id of Resource" },
|
||||
managedBy: { resourceId: "mtkeip" },
|
||||
sizeGiB: 9,
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume.
|
||||
*
|
||||
* @summary Create a Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesCreateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters = { properties: { sizeGiB: 9 } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesCreateMaximumSetGen();
|
||||
volumesCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an Volume.
|
||||
*
|
||||
* @summary Delete an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesDeleteMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const xMsDeleteSnapshots = "true";
|
||||
const xMsForceDelete = "true";
|
||||
const options = {
|
||||
xMsDeleteSnapshots,
|
||||
xMsForceDelete,
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
options,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an Volume.
|
||||
*
|
||||
* @summary Delete an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesDeleteMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesDeleteMaximumSetGen();
|
||||
volumesDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an Volume.
|
||||
*
|
||||
* @summary Get an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesGetMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an Volume.
|
||||
*
|
||||
* @summary Get an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesGetMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesGetMaximumSetGen();
|
||||
volumesGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Volumes in a VolumeGroup.
|
||||
*
|
||||
* @summary List Volumes in a VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesListByVolumeGroupMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumes.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Volumes in a VolumeGroup.
|
||||
*
|
||||
* @summary List Volumes in a VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesListByVolumeGroupMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumes.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesListByVolumeGroupMaximumSetGen();
|
||||
volumesListByVolumeGroupMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { ElasticSanManagement } = require("@azure/arm-elasticsan");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
require("dotenv").config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an Volume.
|
||||
*
|
||||
* @summary Update an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesUpdateMaximumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters = { properties: { sizeGiB: 11 } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an Volume.
|
||||
*
|
||||
* @summary Update an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesUpdateMinimumSetGen() {
|
||||
const subscriptionId = process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName = process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesUpdateMaximumSetGen();
|
||||
volumesUpdateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,115 @@
|
|||
# client library samples for TypeScript (Beta)
|
||||
|
||||
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [elasticSansCreateSample.ts][elasticsanscreatesample] | Create ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json |
|
||||
| [elasticSansDeleteSample.ts][elasticsansdeletesample] | Delete a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json |
|
||||
| [elasticSansGetSample.ts][elasticsansgetsample] | Get a ElasticSan. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json |
|
||||
| [elasticSansListByResourceGroupSample.ts][elasticsanslistbyresourcegroupsample] | Gets a list of ElasticSan in a resource group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json |
|
||||
| [elasticSansListBySubscriptionSample.ts][elasticsanslistbysubscriptionsample] | Gets a list of ElasticSans in a subscription x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json |
|
||||
| [elasticSansUpdateSample.ts][elasticsansupdatesample] | Update a Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json |
|
||||
| [operationsListSample.ts][operationslistsample] | Gets a list of ElasticSan operations. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsCreateSample.ts][privateendpointconnectionscreatesample] | Update the state of specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the Elastic San x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json |
|
||||
| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | List all Private Endpoint Connections associated with the Elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json |
|
||||
| [privateLinkResourcesListByElasticSanSample.ts][privatelinkresourceslistbyelasticsansample] | Gets the private link resources that need to be created for a elastic San. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json |
|
||||
| [skusListSample.ts][skuslistsample] | List all the available Skus in the region and information related to them x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MaximumSet_Gen.json |
|
||||
| [volumeGroupsCreateSample.ts][volumegroupscreatesample] | Create a Volume Group. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json |
|
||||
| [volumeGroupsDeleteSample.ts][volumegroupsdeletesample] | Delete an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json |
|
||||
| [volumeGroupsGetSample.ts][volumegroupsgetsample] | Get an VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json |
|
||||
| [volumeGroupsListByElasticSanSample.ts][volumegroupslistbyelasticsansample] | List VolumeGroups. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json |
|
||||
| [volumeGroupsUpdateSample.ts][volumegroupsupdatesample] | Update an VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsCreateSample.ts][volumesnapshotscreatesample] | Create a Volume Snapshot. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsDeleteSample.ts][volumesnapshotsdeletesample] | Delete a Volume Snapshot. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsGetSample.ts][volumesnapshotsgetsample] | Get a Volume Snapshot. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json |
|
||||
| [volumeSnapshotsListByVolumeGroupSample.ts][volumesnapshotslistbyvolumegroupsample] | List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json |
|
||||
| [volumesCreateSample.ts][volumescreatesample] | Create a Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MaximumSet_Gen.json |
|
||||
| [volumesDeleteSample.ts][volumesdeletesample] | Delete an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json |
|
||||
| [volumesGetSample.ts][volumesgetsample] | Get an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json |
|
||||
| [volumesListByVolumeGroupSample.ts][volumeslistbyvolumegroupsample] | List Volumes in a VolumeGroup. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json |
|
||||
| [volumesUpdateSample.ts][volumesupdatesample] | Update an Volume. x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MaximumSet_Gen.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule).
|
||||
|
||||
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
|
||||
|
||||
```bash
|
||||
npm install -g typescript
|
||||
```
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Compile the samples:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node dist/elasticSansCreateSample.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env ELASTICSANS_SUBSCRIPTION_ID="<elasticsans subscription id>" ELASTICSANS_RESOURCE_GROUP="<elasticsans resource group>" node dist/elasticSansCreateSample.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[elasticsanscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansCreateSample.ts
|
||||
[elasticsansdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansDeleteSample.ts
|
||||
[elasticsansgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansGetSample.ts
|
||||
[elasticsanslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListByResourceGroupSample.ts
|
||||
[elasticsanslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansListBySubscriptionSample.ts
|
||||
[elasticsansupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/elasticSansUpdateSample.ts
|
||||
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/operationsListSample.ts
|
||||
[privateendpointconnectionscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateSample.ts
|
||||
[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts
|
||||
[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts
|
||||
[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateEndpointConnectionsListSample.ts
|
||||
[privatelinkresourceslistbyelasticsansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/privateLinkResourcesListByElasticSanSample.ts
|
||||
[skuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/skusListSample.ts
|
||||
[volumegroupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsCreateSample.ts
|
||||
[volumegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsDeleteSample.ts
|
||||
[volumegroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsGetSample.ts
|
||||
[volumegroupslistbyelasticsansample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsListByElasticSanSample.ts
|
||||
[volumegroupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeGroupsUpdateSample.ts
|
||||
[volumesnapshotscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeSnapshotsCreateSample.ts
|
||||
[volumesnapshotsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeSnapshotsDeleteSample.ts
|
||||
[volumesnapshotsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeSnapshotsGetSample.ts
|
||||
[volumesnapshotslistbyvolumegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumeSnapshotsListByVolumeGroupSample.ts
|
||||
[volumescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesCreateSample.ts
|
||||
[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesDeleteSample.ts
|
||||
[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesGetSample.ts
|
||||
[volumeslistbyvolumegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesListByVolumeGroupSample.ts
|
||||
[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/elasticsans/arm-elasticsan/samples/v1-beta/typescript/src/volumesUpdateSample.ts
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan/README.md
|
||||
[typescript]: https://www.typescriptlang.org/docs/home.html
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-elasticsan-ts-beta",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for TypeScript (Beta)",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"prebuild": "rimraf dist/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Azure/azure-sdk-for-js.git",
|
||||
"directory": "sdk/elasticsans/arm-elasticsan"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"typescript",
|
||||
"browser",
|
||||
"isomorphic"
|
||||
],
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan",
|
||||
"dependencies": {
|
||||
"@azure/arm-elasticsan": "next",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.0.0",
|
||||
"typescript": "~5.6.2",
|
||||
"rimraf": "latest"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
# App registration secret for AAD authentication
|
||||
AZURE_CLIENT_SECRET=
|
||||
AZURE_CLIENT_ID=
|
||||
AZURE_TENANT_ID=
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSan, ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create ElasticSan.
|
||||
*
|
||||
* @summary Create ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters: ElasticSan = {
|
||||
location: "France Central",
|
||||
properties: {
|
||||
autoScaleProperties: {
|
||||
scaleUpProperties: {
|
||||
autoScalePolicyEnforcement: "None",
|
||||
capacityUnitScaleUpLimitTiB: 17,
|
||||
increaseCapacityUnitByTiB: 4,
|
||||
unusedSizeTiB: 24,
|
||||
},
|
||||
},
|
||||
availabilityZones: ["xoz"],
|
||||
baseSizeTiB: 1,
|
||||
extendedCapacitySizeTiB: 3,
|
||||
publicNetworkAccess: "Enabled",
|
||||
sku: { name: "Premium_LRS", tier: "Premium" },
|
||||
},
|
||||
tags: { key9706: "haitqqakcntcpalkzqmjmcnifnhd" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create ElasticSan.
|
||||
*
|
||||
* @summary Create ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters: ElasticSan = {
|
||||
location: "France Central",
|
||||
properties: {
|
||||
baseSizeTiB: 1,
|
||||
extendedCapacitySizeTiB: 3,
|
||||
sku: { name: "Premium_LRS" },
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansCreateMaximumSetGen();
|
||||
elasticSansCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Elastic San.
|
||||
*
|
||||
* @summary Delete a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Elastic San.
|
||||
*
|
||||
* @summary Delete a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansDeleteMaximumSetGen();
|
||||
elasticSansDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a ElasticSan.
|
||||
*
|
||||
* @summary Get a ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a ElasticSan.
|
||||
*
|
||||
* @summary Get a ElasticSan.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansGetMaximumSetGen();
|
||||
elasticSansGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan in a resource group.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan in a resource group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListByResourceGroupMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listByResourceGroup(
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan in a resource group.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan in a resource group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListByResourceGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListByResourceGroupMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listByResourceGroup(
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansListByResourceGroupMaximumSetGen();
|
||||
elasticSansListByResourceGroupMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSans in a subscription
|
||||
*
|
||||
* @summary Gets a list of ElasticSans in a subscription
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListBySubscriptionMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSans in a subscription
|
||||
*
|
||||
* @summary Gets a list of ElasticSans in a subscription
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_ListBySubscription_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansListBySubscriptionMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.elasticSans.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansListBySubscriptionMaximumSetGen();
|
||||
elasticSansListBySubscriptionMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanUpdate, ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a Elastic San.
|
||||
*
|
||||
* @summary Update a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansUpdateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters: ElasticSanUpdate = {
|
||||
properties: {
|
||||
autoScaleProperties: {
|
||||
scaleUpProperties: {
|
||||
autoScalePolicyEnforcement: "None",
|
||||
capacityUnitScaleUpLimitTiB: 17,
|
||||
increaseCapacityUnitByTiB: 4,
|
||||
unusedSizeTiB: 24,
|
||||
},
|
||||
},
|
||||
baseSizeTiB: 21,
|
||||
extendedCapacitySizeTiB: 10,
|
||||
publicNetworkAccess: "Enabled",
|
||||
},
|
||||
tags: { key5945: "eufqmxresekerilkgvfzddolxzas" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a Elastic San.
|
||||
*
|
||||
* @summary Update a Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/ElasticSans_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function elasticSansUpdateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const parameters: ElasticSanUpdate = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.elasticSans.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
elasticSansUpdateMaximumSetGen();
|
||||
elasticSansUpdateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan operations.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan operations.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function operationsListMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets a list of ElasticSan operations.
|
||||
*
|
||||
* @summary Gets a list of ElasticSan operations.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Operations_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function operationsListMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
operationsListMaximumSetGen();
|
||||
operationsListMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
PrivateEndpointConnection,
|
||||
ElasticSanManagement,
|
||||
} from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Update the state of specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const parameters: PrivateEndpointConnection = {
|
||||
properties: {
|
||||
groupIds: ["jdwrzpemdjrpiwzvy"],
|
||||
privateEndpoint: {},
|
||||
privateLinkServiceConnectionState: {
|
||||
description: "dxl",
|
||||
actionsRequired: "jhjdpwvyzipggtn",
|
||||
status: "Pending",
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Update the state of specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const parameters: PrivateEndpointConnection = {
|
||||
properties: { privateLinkServiceConnectionState: {} },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsCreateMaximumSetGen();
|
||||
privateEndpointConnectionsCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Deletes the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Deletes the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsDeleteMaximumSetGen();
|
||||
privateEndpointConnectionsDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Gets the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Elastic San
|
||||
*
|
||||
* @summary Gets the specified private endpoint connection associated with the Elastic San
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const privateEndpointConnectionName = "privateendpointconnectionname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
privateEndpointConnectionName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsGetMaximumSetGen();
|
||||
privateEndpointConnectionsGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San.
|
||||
*
|
||||
* @summary List all Private Endpoint Connections associated with the Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsListMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateEndpointConnections.list(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all Private Endpoint Connections associated with the Elastic San.
|
||||
*
|
||||
* @summary List all Private Endpoint Connections associated with the Elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateEndpointConnections_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateEndpointConnectionsListMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateEndpointConnections.list(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateEndpointConnectionsListMaximumSetGen();
|
||||
privateEndpointConnectionsListMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the private link resources that need to be created for a elastic San.
|
||||
*
|
||||
* @summary Gets the private link resources that need to be created for a elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MaximumSet_Gen.json
|
||||
*/
|
||||
async function privateLinkResourcesListByElasticSanMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateLinkResources.listByElasticSan(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the private link resources that need to be created for a elastic San.
|
||||
*
|
||||
* @summary Gets the private link resources that need to be created for a elastic San.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByElasticSan_MinimumSet_Gen.json
|
||||
*/
|
||||
async function privateLinkResourcesListByElasticSanMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.privateLinkResources.listByElasticSan(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
privateLinkResourcesListByElasticSanMaximumSetGen();
|
||||
privateLinkResourcesListByElasticSanMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
SkusListOptionalParams,
|
||||
ElasticSanManagement,
|
||||
} from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all the available Skus in the region and information related to them
|
||||
*
|
||||
* @summary List all the available Skus in the region and information related to them
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MaximumSet_Gen.json
|
||||
*/
|
||||
async function skusListMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const filter = "obwwdrkq";
|
||||
const options: SkusListOptionalParams = { filter };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.skus.list(options)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List all the available Skus in the region and information related to them
|
||||
*
|
||||
* @summary List all the available Skus in the region and information related to them
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Skus_List_MinimumSet_Gen.json
|
||||
*/
|
||||
async function skusListMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.skus.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
skusListMaximumSetGen();
|
||||
skusListMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { VolumeGroup, ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Group.
|
||||
*
|
||||
* @summary Create a Volume Group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters: VolumeGroup = {
|
||||
identity: { type: "None", userAssignedIdentities: { key1006: {} } },
|
||||
properties: {
|
||||
encryption: "EncryptionAtRestWithPlatformKey",
|
||||
encryptionProperties: {
|
||||
encryptionIdentity: {
|
||||
encryptionUserAssignedIdentity: "gfhkfbozahmmwluqndfgxunssafa",
|
||||
},
|
||||
keyVaultProperties: {
|
||||
keyName: "lunpapamzeimppgobraxjt",
|
||||
keyVaultUri: "https://microsoft.com/a",
|
||||
keyVersion: "oemygbnfmqhijmonkqfqmy",
|
||||
},
|
||||
},
|
||||
enforceDataIntegrityCheckForIscsi: true,
|
||||
networkAcls: {
|
||||
virtualNetworkRules: [
|
||||
{
|
||||
action: "Allow",
|
||||
virtualNetworkResourceId: "bkhwaiqvvaguymsmnzzbzz",
|
||||
},
|
||||
],
|
||||
},
|
||||
protocolType: "Iscsi",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Group.
|
||||
*
|
||||
* @summary Create a Volume Group.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters: VolumeGroup = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsCreateMaximumSetGen();
|
||||
volumeGroupsCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an VolumeGroup.
|
||||
*
|
||||
* @summary Delete an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an VolumeGroup.
|
||||
*
|
||||
* @summary Delete an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsDeleteMaximumSetGen();
|
||||
volumeGroupsDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an VolumeGroups.
|
||||
*
|
||||
* @summary Get an VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an VolumeGroups.
|
||||
*
|
||||
* @summary Get an VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsGetMaximumSetGen();
|
||||
volumeGroupsGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List VolumeGroups.
|
||||
*
|
||||
* @summary List VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsListByElasticSanMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeGroups.listByElasticSan(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List VolumeGroups.
|
||||
*
|
||||
* @summary List VolumeGroups.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_ListByElasticSan_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsListByElasticSanMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeGroups.listByElasticSan(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsListByElasticSanMaximumSetGen();
|
||||
volumeGroupsListByElasticSanMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { VolumeGroupUpdate, ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an VolumeGroup.
|
||||
*
|
||||
* @summary Update an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsUpdateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters: VolumeGroupUpdate = {
|
||||
identity: { type: "None", userAssignedIdentities: { key1006: {} } },
|
||||
properties: {
|
||||
encryption: "EncryptionAtRestWithPlatformKey",
|
||||
encryptionProperties: {
|
||||
encryptionIdentity: {
|
||||
encryptionUserAssignedIdentity: "gfhkfbozahmmwluqndfgxunssafa",
|
||||
},
|
||||
keyVaultProperties: {
|
||||
keyName: "lunpapamzeimppgobraxjt",
|
||||
keyVaultUri: "https://microsoft.com/a",
|
||||
keyVersion: "oemygbnfmqhijmonkqfqmy",
|
||||
},
|
||||
},
|
||||
enforceDataIntegrityCheckForIscsi: true,
|
||||
networkAcls: {
|
||||
virtualNetworkRules: [
|
||||
{
|
||||
action: "Allow",
|
||||
virtualNetworkResourceId: "bkhwaiqvvaguymsmnzzbzz",
|
||||
},
|
||||
],
|
||||
},
|
||||
protocolType: "Iscsi",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an VolumeGroup.
|
||||
*
|
||||
* @summary Update an VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeGroups_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeGroupsUpdateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const parameters: VolumeGroupUpdate = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeGroups.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeGroupsUpdateMaximumSetGen();
|
||||
volumeGroupsUpdateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { Snapshot, ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Snapshot.
|
||||
*
|
||||
* @summary Create a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const parameters: Snapshot = {
|
||||
properties: {
|
||||
creationData: {
|
||||
sourceId:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume Snapshot.
|
||||
*
|
||||
* @summary Create a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const parameters: Snapshot = {
|
||||
properties: {
|
||||
creationData: {
|
||||
sourceId:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsCreateMaximumSetGen();
|
||||
volumeSnapshotsCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Volume Snapshot.
|
||||
*
|
||||
* @summary Delete a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Volume Snapshot.
|
||||
*
|
||||
* @summary Delete a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsDeleteMaximumSetGen();
|
||||
volumeSnapshotsDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a Volume Snapshot.
|
||||
*
|
||||
* @summary Get a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a Volume Snapshot.
|
||||
*
|
||||
* @summary Get a Volume Snapshot.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const snapshotName = "snapshotname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumeSnapshots.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
snapshotName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsGetMaximumSetGen();
|
||||
volumeSnapshotsGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
VolumeSnapshotsListByVolumeGroupOptionalParams,
|
||||
ElasticSanManagement,
|
||||
} from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
*
|
||||
* @summary List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsListByVolumeGroupMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const filter = "volumeName eq <volume name>";
|
||||
const options: VolumeSnapshotsListByVolumeGroupOptionalParams = { filter };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeSnapshots.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
options,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
*
|
||||
* @summary List Snapshots in a VolumeGroup or List Snapshots by Volume (name) in a VolumeGroup using filter
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/VolumeSnapshots_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumeSnapshotsListByVolumeGroupMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumeSnapshots.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumeSnapshotsListByVolumeGroupMaximumSetGen();
|
||||
volumeSnapshotsListByVolumeGroupMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { Volume, ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume.
|
||||
*
|
||||
* @summary Create a Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesCreateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters: Volume = {
|
||||
properties: {
|
||||
creationData: { createSource: "None", sourceId: "ARM Id of Resource" },
|
||||
managedBy: { resourceId: "mtkeip" },
|
||||
sizeGiB: 9,
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a Volume.
|
||||
*
|
||||
* @summary Create a Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Create_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesCreateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters: Volume = { properties: { sizeGiB: 9 } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesCreateMaximumSetGen();
|
||||
volumesCreateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
VolumesDeleteOptionalParams,
|
||||
ElasticSanManagement,
|
||||
} from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an Volume.
|
||||
*
|
||||
* @summary Delete an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesDeleteMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const xMsDeleteSnapshots = "true";
|
||||
const xMsForceDelete = "true";
|
||||
const options: VolumesDeleteOptionalParams = {
|
||||
xMsDeleteSnapshots,
|
||||
xMsForceDelete,
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
options,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an Volume.
|
||||
*
|
||||
* @summary Delete an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Delete_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesDeleteMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesDeleteMaximumSetGen();
|
||||
volumesDeleteMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an Volume.
|
||||
*
|
||||
* @summary Get an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesGetMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get an Volume.
|
||||
*
|
||||
* @summary Get an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Get_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesGetMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.get(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesGetMaximumSetGen();
|
||||
volumesGetMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Volumes in a VolumeGroup.
|
||||
*
|
||||
* @summary List Volumes in a VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesListByVolumeGroupMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumes.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Volumes in a VolumeGroup.
|
||||
*
|
||||
* @summary List Volumes in a VolumeGroup.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_ListByVolumeGroup_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesListByVolumeGroupMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.volumes.listByVolumeGroup(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesListByVolumeGroupMaximumSetGen();
|
||||
volumesListByVolumeGroupMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { VolumeUpdate, ElasticSanManagement } from "@azure/arm-elasticsan";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an Volume.
|
||||
*
|
||||
* @summary Update an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MaximumSet_Gen.json
|
||||
*/
|
||||
async function volumesUpdateMaximumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters: VolumeUpdate = { properties: { sizeGiB: 11 } };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update an Volume.
|
||||
*
|
||||
* @summary Update an Volume.
|
||||
* x-ms-original-file: specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-06-01-preview/examples/Volumes_Update_MinimumSet_Gen.json
|
||||
*/
|
||||
async function volumesUpdateMinimumSetGen() {
|
||||
const subscriptionId =
|
||||
process.env["ELASTICSANS_SUBSCRIPTION_ID"] || "subscriptionid";
|
||||
const resourceGroupName =
|
||||
process.env["ELASTICSANS_RESOURCE_GROUP"] || "resourcegroupname";
|
||||
const elasticSanName = "elasticsanname";
|
||||
const volumeGroupName = "volumegroupname";
|
||||
const volumeName = "volumename";
|
||||
const parameters: VolumeUpdate = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ElasticSanManagement(credential, subscriptionId);
|
||||
const result = await client.volumes.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
elasticSanName,
|
||||
volumeGroupName,
|
||||
volumeName,
|
||||
parameters,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
volumesUpdateMaximumSetGen();
|
||||
volumesUpdateMinimumSetGen();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"alwaysStrict": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
]
|
||||
}
|
|
@ -68,7 +68,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
|
|||
credential: credentials,
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-elasticsan/1.1.0`;
|
||||
const packageDetails = `azsdk-js-arm-elasticsan/1.2.0-beta.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
@ -122,7 +122,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
|
|||
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2024-05-01";
|
||||
this.apiVersion = options.apiVersion || "2024-06-01-preview";
|
||||
this.operations = new OperationsImpl(this);
|
||||
this.skus = new SkusImpl(this);
|
||||
this.elasticSans = new ElasticSansImpl(this);
|
||||
|
|
|
@ -249,6 +249,8 @@ export interface ElasticSanProperties {
|
|||
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
||||
/** Allow or disallow public network access to ElasticSan. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. */
|
||||
publicNetworkAccess?: PublicNetworkAccess;
|
||||
/** Auto Scale Properties for Elastic San Appliance. */
|
||||
autoScaleProperties?: AutoScaleProperties;
|
||||
}
|
||||
|
||||
/** The SKU name. Required for account creation; optional for update. */
|
||||
|
@ -333,6 +335,24 @@ export interface SystemData {
|
|||
lastModifiedAt?: Date;
|
||||
}
|
||||
|
||||
/** The auto scale settings on Elastic San Appliance. */
|
||||
export interface AutoScaleProperties {
|
||||
/** Scale up settings on Elastic San Appliance. */
|
||||
scaleUpProperties?: ScaleUpProperties;
|
||||
}
|
||||
|
||||
/** Scale up properties on Elastic San Appliance. */
|
||||
export interface ScaleUpProperties {
|
||||
/** Unused size on Elastic San appliance in TiB. */
|
||||
unusedSizeTiB?: number;
|
||||
/** Unit to increase Capacity Unit on Elastic San appliance in TiB. */
|
||||
increaseCapacityUnitByTiB?: number;
|
||||
/** Maximum scale up size on Elastic San appliance in TiB. */
|
||||
capacityUnitScaleUpLimitTiB?: number;
|
||||
/** Enable or Disable scale up setting on Elastic San Appliance. */
|
||||
autoScalePolicyEnforcement?: AutoScalePolicyEnforcement;
|
||||
}
|
||||
|
||||
/** Response for ElasticSan update request. */
|
||||
export interface ElasticSanUpdate {
|
||||
/** Properties of ElasticSan. */
|
||||
|
@ -349,6 +369,8 @@ export interface ElasticSanUpdateProperties {
|
|||
extendedCapacitySizeTiB?: number;
|
||||
/** Allow or disallow public network access to ElasticSan Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. */
|
||||
publicNetworkAccess?: PublicNetworkAccess;
|
||||
/** Auto Scale Properties for Elastic San Appliance. */
|
||||
autoScaleProperties?: AutoScaleProperties;
|
||||
}
|
||||
|
||||
/** List of Volume Groups */
|
||||
|
@ -919,6 +941,27 @@ export enum KnownPublicNetworkAccess {
|
|||
*/
|
||||
export type PublicNetworkAccess = string;
|
||||
|
||||
/** Known values of {@link AutoScalePolicyEnforcement} that the service accepts. */
|
||||
export enum KnownAutoScalePolicyEnforcement {
|
||||
/** None */
|
||||
None = "None",
|
||||
/** Enabled */
|
||||
Enabled = "Enabled",
|
||||
/** Disabled */
|
||||
Disabled = "Disabled",
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for AutoScalePolicyEnforcement. \
|
||||
* {@link KnownAutoScalePolicyEnforcement} can be used interchangeably with AutoScalePolicyEnforcement,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **None** \
|
||||
* **Enabled** \
|
||||
* **Disabled**
|
||||
*/
|
||||
export type AutoScalePolicyEnforcement = string;
|
||||
|
||||
/** Known values of {@link IdentityType} that the service accepts. */
|
||||
export enum KnownIdentityType {
|
||||
/** None */
|
||||
|
|
|
@ -487,6 +487,13 @@ export const ElasticSanProperties: coreClient.CompositeMapper = {
|
|||
name: "String",
|
||||
},
|
||||
},
|
||||
autoScaleProperties: {
|
||||
serializedName: "autoScaleProperties",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "AutoScaleProperties",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -679,6 +686,55 @@ export const SystemData: coreClient.CompositeMapper = {
|
|||
},
|
||||
};
|
||||
|
||||
export const AutoScaleProperties: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "AutoScaleProperties",
|
||||
modelProperties: {
|
||||
scaleUpProperties: {
|
||||
serializedName: "scaleUpProperties",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ScaleUpProperties",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const ScaleUpProperties: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ScaleUpProperties",
|
||||
modelProperties: {
|
||||
unusedSizeTiB: {
|
||||
serializedName: "unusedSizeTiB",
|
||||
type: {
|
||||
name: "Number",
|
||||
},
|
||||
},
|
||||
increaseCapacityUnitByTiB: {
|
||||
serializedName: "increaseCapacityUnitByTiB",
|
||||
type: {
|
||||
name: "Number",
|
||||
},
|
||||
},
|
||||
capacityUnitScaleUpLimitTiB: {
|
||||
serializedName: "capacityUnitScaleUpLimitTiB",
|
||||
type: {
|
||||
name: "Number",
|
||||
},
|
||||
},
|
||||
autoScalePolicyEnforcement: {
|
||||
serializedName: "autoScalePolicyEnforcement",
|
||||
type: {
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const ElasticSanUpdate: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
|
@ -725,6 +781,13 @@ export const ElasticSanUpdateProperties: coreClient.CompositeMapper = {
|
|||
name: "String",
|
||||
},
|
||||
},
|
||||
autoScaleProperties: {
|
||||
serializedName: "autoScaleProperties",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "AutoScaleProperties",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ export const $host: OperationURLParameter = {
|
|||
export const apiVersion: OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
defaultValue: "2024-05-01",
|
||||
defaultValue: "2024-06-01-preview",
|
||||
isConstant: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче