This commit is contained in:
colawwj 2022-03-02 16:34:13 +08:00 коммит произвёл GitHub
Родитель 9c4f1e5dc4
Коммит 978ebb54e6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
237 изменённых файлов: 10549 добавлений и 143 удалений

Просмотреть файл

@ -11412,27 +11412,28 @@ packages:
dev: false
file:projects/arm-netapp.tgz:
resolution: {integrity: sha512-ovCe7gK7PTpM+0vh0odxrCi8yCeEAS3DHjkyeG9VryTXs3PlWdAjdxCR1L+Je0veUslcb2DIxv4B6dekCPCFvg==, tarball: file:projects/arm-netapp.tgz}
resolution: {integrity: sha512-BxqmyPJTZGmcXiuya10kSyUifo4nWfNo6MiuleBAIEzMHzb4/9hXmv7h/n4y8AAE7lRRGDWrYGJaIBZyjb2gyw==, tarball: file:projects/arm-netapp.tgz}
name: '@rush-temp/arm-netapp'
version: 0.0.0
dependencies:
'@azure-tools/test-recorder': 1.0.2
'@azure/identity': 2.0.4
'@microsoft/api-extractor': 7.19.4
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
'@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1
'@rollup/plugin-json': 4.1.0_rollup@2.67.1
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.67.1
'@rollup/plugin-node-resolve': 13.1.3_rollup@2.67.1
cross-env: 7.0.3
mkdirp: 1.0.4
mocha: 7.2.0
rimraf: 3.0.2
rollup: 1.32.1
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
rollup: 2.67.1
rollup-plugin-sourcemaps: 0.6.3_rollup@2.67.1
tslib: 2.3.1
typescript: 4.2.4
uglify-js: 3.15.1
transitivePeerDependencies:
- '@types/node'
- debug
- encoding
- supports-color

Просмотреть файл

@ -1,5 +1,48 @@
# Release History
## 15.1.0 (2022-03-02)
**Features**
- Added operation group Subvolumes
- Added operation Snapshots.beginRestoreFiles
- Added operation Snapshots.beginRestoreFilesAndWait
- Added Interface LdapSearchScopeOpt
- Added Interface SnapshotRestoreFiles
- Added Interface SnapshotsRestoreFilesOptionalParams
- Added Interface SubvolumeModel
- Added Interface SubvolumePatchRequest
- Added Interface SubvolumesCreateOptionalParams
- Added Interface SubvolumesDeleteOptionalParams
- Added Interface SubvolumesGetMetadataOptionalParams
- Added Interface SubvolumesGetOptionalParams
- Added Interface SubvolumesList
- Added Interface SubvolumesListByVolumeNextOptionalParams
- Added Interface SubvolumesListByVolumeOptionalParams
- Added Interface SubvolumesUpdateOptionalParams
- Added Type Alias EnableSubvolumes
- Added Type Alias SubvolumeInfo
- Added Type Alias SubvolumesCreateResponse
- Added Type Alias SubvolumesGetMetadataResponse
- Added Type Alias SubvolumesGetResponse
- Added Type Alias SubvolumesListByVolumeNextResponse
- Added Type Alias SubvolumesListByVolumeResponse
- Added Type Alias SubvolumesUpdateResponse
- Interface ActiveDirectory has a new optional parameter ldapSearchScope
- Interface BackupPolicy has a new optional parameter systemData
- Interface CapacityPool has a new optional parameter systemData
- Interface SnapshotPolicy has a new optional parameter systemData
- Interface Volume has a new optional parameter enableSubvolumes
- Interface Volume has a new optional parameter maximumNumberOfFiles
- Interface Volume has a new optional parameter systemData
- Interface VolumeGroupVolumeProperties has a new optional parameter enableSubvolumes
- Interface VolumeGroupVolumeProperties has a new optional parameter maximumNumberOfFiles
- Interface VolumePatch has a new optional parameter unixPermissions
- Interface VolumesDeleteOptionalParams has a new optional parameter forceDelete
- Class NetAppManagementClient has a new parameter subvolumes
- Added Enum KnownEnableSubvolumes
## 15.0.0 (2022-01-20)
The package of @azure/arm-netapp is using our next generation design principles since version 15.0.0, which contains breaking changes.

Просмотреть файл

@ -16,6 +16,8 @@ Microsoft NetApp Files Azure Resource Provider specification
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox.
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
### Prerequisites
- An [Azure subscription][azure_sub].
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
```javascript
const { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new NetAppManagementClient(new DefaultAzureCredential(), subscriptionId);
// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new NetAppManagementClient(credential, subscriptionId);
```

Просмотреть файл

@ -1,7 +1,7 @@
{
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
"commit": "4042a47cff72c950d35dd72149895b044ed79713",
"readme": "specification/netapp/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/netapp/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\netapp\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.16 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
"use": "@autorest/typescript@6.0.0-beta.16"
}

Просмотреть файл

@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-netapp.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}

Просмотреть файл

@ -3,8 +3,10 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for NetAppManagementClient.",
"version": "15.0.0",
"engines": { "node": ">=12.0.0" },
"version": "15.1.0",
"engines": {
"node": ">=12.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/abort-controller": "^1.0.0",
@ -14,20 +16,26 @@
"@azure/core-rest-pipeline": "^1.1.0",
"tslib": "^2.2.0"
},
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"keywords": [
"node",
"azure",
"typescript",
"browser",
"isomorphic"
],
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-netapp.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.18.11",
"@rollup/plugin-commonjs": "11.0.2",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^1.16.3",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
@ -41,7 +49,9 @@
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
@ -90,8 +100,19 @@
"sideEffects": false,
"//metadata": {
"constantPaths": [
{ "path": "src/NetAppManagementClient.ts", "prefix": "packageDetails" }
{
"path": "src/netAppManagementClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-netapp?view=azure-node-preview"
}
}

Просмотреть файл

@ -128,6 +128,7 @@ export interface ActiveDirectory {
encryptDCConnections?: boolean;
kdcIP?: string;
ldapOverTLS?: boolean;
ldapSearchScope?: LdapSearchScopeOpt;
ldapSigning?: boolean;
organizationalUnit?: string;
password?: string;
@ -253,6 +254,7 @@ export interface BackupPolicy {
monthlyBackupsToKeep?: number;
readonly name?: string;
readonly provisioningState?: string;
readonly systemData?: SystemData;
tags?: {
[propertyName: string]: string;
};
@ -405,6 +407,7 @@ export interface CapacityPool {
qosType?: QosType;
serviceLevel: ServiceLevel;
size: number;
readonly systemData?: SystemData;
tags?: {
[propertyName: string]: string;
};
@ -476,6 +479,9 @@ export interface Dimension {
name?: string;
}
// @public
export type EnableSubvolumes = string;
// @public
export type EncryptionType = string;
@ -588,6 +594,12 @@ export enum KnownCreatedByType {
User = "User"
}
// @public
export enum KnownEnableSubvolumes {
Disabled = "Disabled",
Enabled = "Enabled"
}
// @public
export enum KnownEncryptionType {
Double = "Double",
@ -679,6 +691,13 @@ export enum KnownVolumeStorageToNetworkProximity {
T2 = "T2"
}
// @public
export interface LdapSearchScopeOpt {
groupDN?: string;
groupMembershipFilter?: string;
userDN?: string;
}
// @public
export interface LogSpecification {
displayName?: string;
@ -809,6 +828,8 @@ export class NetAppManagementClient extends coreClient.ServiceClient {
// (undocumented)
subscriptionId: string;
// (undocumented)
subvolumes: Subvolumes;
// (undocumented)
vaults: Vaults;
// (undocumented)
volumeGroups: VolumeGroups;
@ -1137,6 +1158,7 @@ export interface SnapshotPolicy {
monthlySchedule?: MonthlySchedule;
readonly name?: string;
readonly provisioningState?: string;
readonly systemData?: SystemData;
tags?: {
[propertyName: string]: string;
};
@ -1183,12 +1205,20 @@ export interface SnapshotPolicyVolumeList {
value?: Volume[];
}
// @public
export interface SnapshotRestoreFiles {
destinationPath?: string;
filePaths: string[];
}
// @public
export interface Snapshots {
beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise<PollerLike<PollOperationState<SnapshotsCreateResponse>, SnapshotsCreateResponse>>;
beginCreateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise<SnapshotsCreateResponse>;
beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise<void>;
beginRestoreFiles(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: SnapshotRestoreFiles, options?: SnapshotsRestoreFilesOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginRestoreFilesAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: SnapshotRestoreFiles, options?: SnapshotsRestoreFilesOptionalParams): Promise<void>;
beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Record<string, unknown>, options?: SnapshotsUpdateOptionalParams): Promise<PollerLike<PollOperationState<SnapshotsUpdateResponse>, SnapshotsUpdateResponse>>;
beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Record<string, unknown>, options?: SnapshotsUpdateOptionalParams): Promise<SnapshotsUpdateResponse>;
get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsGetOptionalParams): Promise<SnapshotsGetResponse>;
@ -1229,6 +1259,12 @@ export interface SnapshotsListOptionalParams extends coreClient.OperationOptions
// @public
export type SnapshotsListResponse = SnapshotsList;
// @public
export interface SnapshotsRestoreFilesOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export interface SnapshotsUpdateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
@ -1250,6 +1286,112 @@ export interface SubscriptionQuotaItemList {
value?: SubscriptionQuotaItem[];
}
// @public
export type SubvolumeInfo = ProxyResource & {
readonly systemData?: SystemData;
path?: string;
size?: number;
parentPath?: string;
readonly provisioningState?: string;
};
// @public
export interface SubvolumeModel {
accessedTimeStamp?: Date;
bytesUsed?: number;
changedTimeStamp?: Date;
creationTimeStamp?: Date;
readonly id?: string;
modifiedTimeStamp?: Date;
readonly name?: string;
parentPath?: string;
path?: string;
permissions?: string;
provisioningState?: string;
size?: number;
readonly type?: string;
}
// @public
export interface SubvolumePatchRequest {
path?: string;
size?: number;
}
// @public
export interface Subvolumes {
beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumeInfo, options?: SubvolumesCreateOptionalParams): Promise<PollerLike<PollOperationState<SubvolumesCreateResponse>, SubvolumesCreateResponse>>;
beginCreateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumeInfo, options?: SubvolumesCreateOptionalParams): Promise<SubvolumesCreateResponse>;
beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesDeleteOptionalParams): Promise<void>;
beginGetMetadata(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesGetMetadataOptionalParams): Promise<PollerLike<PollOperationState<SubvolumesGetMetadataResponse>, SubvolumesGetMetadataResponse>>;
beginGetMetadataAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesGetMetadataOptionalParams): Promise<SubvolumesGetMetadataResponse>;
beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumePatchRequest, options?: SubvolumesUpdateOptionalParams): Promise<PollerLike<PollOperationState<SubvolumesUpdateResponse>, SubvolumesUpdateResponse>>;
beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumePatchRequest, options?: SubvolumesUpdateOptionalParams): Promise<SubvolumesUpdateResponse>;
get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesGetOptionalParams): Promise<SubvolumesGetResponse>;
listByVolume(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: SubvolumesListByVolumeOptionalParams): PagedAsyncIterableIterator<SubvolumeInfo>;
}
// @public
export interface SubvolumesCreateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export type SubvolumesCreateResponse = SubvolumeInfo;
// @public
export interface SubvolumesDeleteOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export interface SubvolumesGetMetadataOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export type SubvolumesGetMetadataResponse = SubvolumeModel;
// @public
export interface SubvolumesGetOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SubvolumesGetResponse = SubvolumeInfo;
// @public
export interface SubvolumesList {
nextLink?: string;
value?: SubvolumeInfo[];
}
// @public
export interface SubvolumesListByVolumeNextOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SubvolumesListByVolumeNextResponse = SubvolumesList;
// @public
export interface SubvolumesListByVolumeOptionalParams extends coreClient.OperationOptions {
}
// @public
export type SubvolumesListByVolumeResponse = SubvolumesList;
// @public
export interface SubvolumesUpdateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}
// @public
export type SubvolumesUpdateResponse = SubvolumeInfo;
// @public
export interface SystemData {
createdAt?: Date;
@ -1299,6 +1441,7 @@ export interface Volume {
dataProtection?: VolumePropertiesDataProtection;
defaultGroupQuotaInKiBs?: number;
defaultUserQuotaInKiBs?: number;
enableSubvolumes?: EnableSubvolumes;
encryptionKeySource?: string;
readonly etag?: string;
exportPolicy?: VolumePropertiesExportPolicy;
@ -1309,6 +1452,7 @@ export interface Volume {
kerberosEnabled?: boolean;
ldapEnabled?: boolean;
location: string;
readonly maximumNumberOfFiles?: number;
readonly mountTargets?: MountTargetProperties[];
readonly name?: string;
networkFeatures?: NetworkFeatures;
@ -1325,6 +1469,7 @@ export interface Volume {
snapshotId?: string;
readonly storageToNetworkProximity?: VolumeStorageToNetworkProximity;
subnetId: string;
readonly systemData?: SystemData;
readonly t2Network?: string;
tags?: {
[propertyName: string]: string;
@ -1447,6 +1592,7 @@ export interface VolumeGroupVolumeProperties {
dataProtection?: VolumePropertiesDataProtection;
defaultGroupQuotaInKiBs?: number;
defaultUserQuotaInKiBs?: number;
enableSubvolumes?: EnableSubvolumes;
encryptionKeySource?: string;
exportPolicy?: VolumePropertiesExportPolicy;
readonly fileSystemId?: string;
@ -1455,6 +1601,7 @@ export interface VolumeGroupVolumeProperties {
isRestoring?: boolean;
kerberosEnabled?: boolean;
ldapEnabled?: boolean;
readonly maximumNumberOfFiles?: number;
readonly mountTargets?: MountTargetProperties[];
name?: string;
networkFeatures?: NetworkFeatures;
@ -1506,6 +1653,7 @@ export interface VolumePatch {
};
throughputMibps?: number;
readonly type?: string;
unixPermissions?: string;
usageThreshold?: number;
}
@ -1588,6 +1736,7 @@ export type VolumesCreateOrUpdateResponse = Volume;
// @public
export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions {
forceDelete?: boolean;
resumeFrom?: string;
updateIntervalInMs?: number;
}

Просмотреть файл

@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
import nodeBuiltins from "builtin-modules";
/**
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
*
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
* __exportStar downleveled helper function to declare its exports which confuses
* rollup's automatic discovery mechanism.
*
* @returns an object reference that can be `...`'d into your cjs() configuration.
*/
export function openTelemetryCommonJs() {
const namedExports = {};
for (const key of [
"@opentelemetry/api",
"@azure/core-tracing/node_modules/@opentelemetry/api"
]) {
namedExports[key] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext",
"setSpanContext"
];
}
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
for (const version of releasedOpenTelemetryVersions) {
namedExports[
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
] = [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"StatusCode",
"CanonicalCode",
"getSpanContext",
"setSpanContext"
];
}
return namedExports;
}
// #region Warning Handler
/**
* A function that can determine whether a rollupwarning should be ignored. If
* A function that can determine whether a rollup warning should be ignored. If
* the function returns `true`, then the warning will not be displayed.
*/
function ignoreNiseSinonEvalWarnings(warning) {
function ignoreNiseSinonEval(warning) {
return (
warning.code === "EVAL" &&
warning.id &&
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
);
}
function ignoreChaiCircularDependencyWarnings(warning) {
function ignoreChaiCircularDependency(warning) {
return (
warning.code === "CIRCULAR_DEPENDENCY" &&
warning.importer && warning.importer.includes("node_modules/chai") === true
);
}
const warningInhibitors = [
ignoreChaiCircularDependencyWarnings,
ignoreNiseSinonEvalWarnings
];
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
/**
* Construct a warning handler for the shared rollup configuration
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
nodeResolve({
mainFields: ["module", "browser"]
}),
cjs({
namedExports: {
// Chai's strange internal architecture makes it impossible to statically
// analyze its exports.
chai: [
"version",
"use",
"util",
"config",
"expect",
"should",
"assert"
],
...openTelemetryCommonJs()
}
}),
cjs(),
json(),
sourcemaps()
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
],
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
preserveSymlinks: false,
plugins: [sourcemaps(), nodeResolve(), cjs()]
plugins: [sourcemaps(), nodeResolve()]
};
const config = [baseConfig];

Просмотреть файл

@ -0,0 +1,4 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified Backup for a Netapp Account
*
* @summary Delete the specified Backup for a Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Delete.json
*/
async function accountBackupsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "resourceGroup";
const accountName = "accountName";
const backupName = "backupName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accountBackups.beginDeleteAndWait(
resourceGroupName,
accountName,
backupName
);
console.log(result);
}
accountBackupsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the specified backup for a Netapp Account
*
* @summary Gets the specified backup for a Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Get.json
*/
async function accountBackupsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupName = "backup1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accountBackups.get(
resourceGroupName,
accountName,
backupName
);
console.log(result);
}
accountBackupsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all Backups for a Netapp Account
*
* @summary List all Backups for a Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_List.json
*/
async function accountBackupsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.accountBackups.list(
resourceGroupName,
accountName
)) {
resArray.push(item);
}
console.log(resArray);
}
accountBackupsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,51 @@
/*
* 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 { NetAppAccount, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update the specified NetApp account within the resource group
*
* @summary Create or update the specified NetApp account within the resource group
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_CreateOrUpdate.json
*/
async function accountsCreateOrUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const body: NetAppAccount = {
activeDirectories: [
{
aesEncryption: true,
dns: "10.10.10.3, 10.10.10.4",
domain: "10.10.10.3",
ldapOverTLS: false,
ldapSigning: false,
organizationalUnit: "OU=Engineering",
password: "ad_password",
site: "SiteName",
smbServerName: "SMBServer",
username: "ad_user_name"
}
],
location: "eastus"
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.beginCreateOrUpdateAndWait(
resourceGroupName,
accountName,
body
);
console.log(result);
}
accountsCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified NetApp account
*
* @summary Delete the specified NetApp account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Delete.json
*/
async function accountsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.beginDeleteAndWait(
resourceGroupName,
accountName
);
console.log(result);
}
accountsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the NetApp account
*
* @summary Get the NetApp account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Get.json
*/
async function accountsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.get(resourceGroupName, accountName);
console.log(result);
}
accountsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List and describe all NetApp accounts in the subscription.
*
* @summary List and describe all NetApp accounts in the subscription.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json
*/
async function accountsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.accounts.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
accountsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List and describe all NetApp accounts in the resource group.
*
* @summary List and describe all NetApp accounts in the resource group.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json
*/
async function accountsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.accounts.list(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
accountsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppAccountPatch, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch the specified NetApp account
*
* @summary Patch the specified NetApp account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Update.json
*/
async function accountsUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const body: NetAppAccountPatch = { tags: { tag1: "Value1" } };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.beginUpdateAndWait(
resourceGroupName,
accountName,
body
);
console.log(result);
}
accountsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* 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 { BackupPolicy, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create a backup policy for Netapp Account
*
* @summary Create a backup policy for Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Create.json
*/
async function backupPoliciesCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupPolicyName = "backupPolicyName";
const body: BackupPolicy = {
dailyBackupsToKeep: 10,
enabled: true,
location: "westus",
monthlyBackupsToKeep: 10,
weeklyBackupsToKeep: 10
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.beginCreateAndWait(
resourceGroupName,
accountName,
backupPolicyName,
body
);
console.log(result);
}
backupPoliciesCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete backup policy
*
* @summary Delete backup policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Delete.json
*/
async function backupsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "resourceGroup";
const accountName = "accountName";
const backupPolicyName = "backupPolicyName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.beginDeleteAndWait(
resourceGroupName,
accountName,
backupPolicyName
);
console.log(result);
}
backupsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a particular backup Policy
*
* @summary Get a particular backup Policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Get.json
*/
async function backupsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupPolicyName = "backupPolicyName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.get(
resourceGroupName,
accountName,
backupPolicyName
);
console.log(result);
}
backupsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List backup policies for Netapp Account
*
* @summary List backup policies for Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_List.json
*/
async function backupsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.backupPolicies.list(
resourceGroupName,
accountName
)) {
resArray.push(item);
}
console.log(resArray);
}
backupsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* 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 { BackupPolicyPatch, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch a backup policy for Netapp Account
*
* @summary Patch a backup policy for Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Update.json
*/
async function backupPoliciesUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupPolicyName = "backupPolicyName";
const body: BackupPolicyPatch = {
dailyBackupsToKeep: 5,
enabled: false,
location: "westus",
monthlyBackupsToKeep: 10,
weeklyBackupsToKeep: 10
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.beginUpdateAndWait(
resourceGroupName,
accountName,
backupPolicyName,
body
);
console.log(result);
}
backupPoliciesUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* 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 { Backup, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create a backup for the volume
*
* @summary Create a backup for the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Create.json
*/
async function backupsCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const backupName = "backup1";
const body: Backup = { label: "myLabel", location: "eastus" };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.beginCreateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName,
body
);
console.log(result);
}
backupsCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete a backup of the volume
*
* @summary Delete a backup of the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Delete.json
*/
async function backupsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "resourceGroup";
const accountName = "accountName";
const poolName = "poolName";
const volumeName = "volumeName";
const backupName = "backupName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.beginDeleteAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName
);
console.log(result);
}
backupsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Gets the specified backup of the volume
*
* @summary Gets the specified backup of the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Get.json
*/
async function backupsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const backupName = "backup1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.get(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName
);
console.log(result);
}
backupsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the status of the backup for a volume
*
* @summary Get the status of the backup for a volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BackupStatus.json
*/
async function volumesBackupStatus() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.getStatus(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesBackupStatus().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the status of the restore for a volume
*
* @summary Get the status of the restore for a volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_RestoreStatus.json
*/
async function volumesRestoreStatus() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.getVolumeRestoreStatus(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesRestoreStatus().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all backups for a volume
*
* @summary List all backups for a volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_List.json
*/
async function backupsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.backups.list(
resourceGroupName,
accountName,
poolName,
volumeName
)) {
resArray.push(item);
}
console.log(resArray);
}
backupsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,46 @@
/*
* 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 {
BackupPatch,
BackupsUpdateOptionalParams,
NetAppManagementClient
} from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch a backup for the volume
*
* @summary Patch a backup for the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Update.json
*/
async function backupsUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const backupName = "backup1";
const body: BackupPatch = {};
const options: BackupsUpdateOptionalParams = { body };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.beginUpdateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName,
options
);
console.log(result);
}
backupsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Check if a file path is available.
*
* @summary Check if a file path is available.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckFilePathAvailability.json
*/
async function checkFilePathAvailability() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const location = "eastus";
const name = "my-exact-filepth";
const subnetId =
"/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.netAppResource.checkFilePathAvailability(
location,
name,
subnetId
);
console.log(result);
}
checkFilePathAvailability().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Check if a resource name is available.
*
* @summary Check if a resource name is available.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckNameAvailability.json
*/
async function checkNameAvailability() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const location = "eastus";
const name = "accName";
const typeParam = "netAppAccount";
const resourceGroup = "myRG";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.netAppResource.checkNameAvailability(
location,
name,
typeParam,
resourceGroup
);
console.log(result);
}
checkNameAvailability().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Check if a quota is available.
*
* @summary Check if a quota is available.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckQuotaAvailability.json
*/
async function checkQuotaAvailability() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const location = "eastus";
const name = "resource1";
const typeParam = "Microsoft.NetApp/netAppAccounts";
const resourceGroup = "myRG";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.netAppResource.checkQuotaAvailability(
location,
name,
typeParam,
resourceGroup
);
console.log(result);
}
checkQuotaAvailability().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the default and current subscription quota limit
*
* @summary Get the default and current subscription quota limit
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_Get.json
*/
async function quotaLimits() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const location = "eastus";
const quotaLimitName = "totalCoolAccessVolumesPerSubscription";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.netAppResourceQuotaLimits.get(
location,
quotaLimitName
);
console.log(result);
}
quotaLimits().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the default and current limits for quotas
*
* @summary Get the default and current limits for quotas
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_List.json
*/
async function quotaLimits() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const location = "eastus";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.netAppResourceQuotaLimits.list(location)) {
resArray.push(item);
}
console.log(resArray);
}
quotaLimits().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Lists all of the available Microsoft.NetApp Rest API operations
*
* @summary Lists all of the available Microsoft.NetApp Rest API operations
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/OperationList.json
*/
async function operationList() {
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
operationList().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* 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 { CapacityPool, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or Update a capacity pool
*
* @summary Create or Update a capacity pool
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_CreateOrUpdate.json
*/
async function poolsCreateOrUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const body: CapacityPool = {
location: "eastus",
qosType: "Auto",
serviceLevel: "Premium",
size: 4398046511104
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.pools.beginCreateOrUpdateAndWait(
resourceGroupName,
accountName,
poolName,
body
);
console.log(result);
}
poolsCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified capacity pool
*
* @summary Delete the specified capacity pool
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Delete.json
*/
async function poolsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.pools.beginDeleteAndWait(
resourceGroupName,
accountName,
poolName
);
console.log(result);
}
poolsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get details of the specified capacity pool
*
* @summary Get details of the specified capacity pool
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Get.json
*/
async function poolsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.pools.get(
resourceGroupName,
accountName,
poolName
);
console.log(result);
}
poolsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all capacity pools in the NetApp Account
*
* @summary List all capacity pools in the NetApp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_List.json
*/
async function poolsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.pools.list(resourceGroupName, accountName)) {
resArray.push(item);
}
console.log(resArray);
}
poolsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { CapacityPoolPatch, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch the specified capacity pool
*
* @summary Patch the specified capacity pool
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Update.json
*/
async function poolsUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const body: CapacityPoolPatch = {};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.pools.beginUpdateAndWait(
resourceGroupName,
accountName,
poolName,
body
);
console.log(result);
}
poolsUpdate().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.
import { SnapshotPolicy, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create a snapshot policy
*
* @summary Create a snapshot policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Create.json
*/
async function snapshotPoliciesCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const snapshotPolicyName = "snapshotPolicyName";
const body: SnapshotPolicy = {
dailySchedule: { hour: 14, minute: 30, snapshotsToKeep: 4 },
enabled: true,
hourlySchedule: { minute: 50, snapshotsToKeep: 2 },
location: "eastus",
monthlySchedule: {
daysOfMonth: "10,11,12",
hour: 14,
minute: 15,
snapshotsToKeep: 5
},
weeklySchedule: {
day: "Wednesday",
hour: 14,
minute: 45,
snapshotsToKeep: 3
}
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshotPolicies.create(
resourceGroupName,
accountName,
snapshotPolicyName,
body
);
console.log(result);
}
snapshotPoliciesCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete snapshot policy
*
* @summary Delete snapshot policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Delete.json
*/
async function snapshotPoliciesDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "resourceGroup";
const accountName = "accountName";
const snapshotPolicyName = "snapshotPolicyName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshotPolicies.beginDeleteAndWait(
resourceGroupName,
accountName,
snapshotPolicyName
);
console.log(result);
}
snapshotPoliciesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get a snapshot Policy
*
* @summary Get a snapshot Policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Get.json
*/
async function snapshotPoliciesGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const snapshotPolicyName = "snapshotPolicyName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshotPolicies.get(
resourceGroupName,
accountName,
snapshotPolicyName
);
console.log(result);
}
snapshotPoliciesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List snapshot policy
*
* @summary List snapshot policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_List.json
*/
async function snapshotPoliciesList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.snapshotPolicies.list(
resourceGroupName,
accountName
)) {
resArray.push(item);
}
console.log(resArray);
}
snapshotPoliciesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get volumes associated with snapshot policy
*
* @summary Get volumes associated with snapshot policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_ListVolumes.json
*/
async function snapshotPoliciesListVolumes() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const snapshotPolicyName = "snapshotPolicyName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshotPolicies.listVolumes(
resourceGroupName,
accountName,
snapshotPolicyName
);
console.log(result);
}
snapshotPoliciesListVolumes().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.
import { SnapshotPolicyPatch, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch a snapshot policy
*
* @summary Patch a snapshot policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Update.json
*/
async function snapshotPoliciesUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const snapshotPolicyName = "snapshotPolicyName";
const body: SnapshotPolicyPatch = {
dailySchedule: { hour: 14, minute: 30, snapshotsToKeep: 4 },
enabled: true,
hourlySchedule: { minute: 50, snapshotsToKeep: 2 },
location: "eastus",
monthlySchedule: {
daysOfMonth: "10,11,12",
hour: 14,
minute: 15,
snapshotsToKeep: 5
},
weeklySchedule: {
day: "Wednesday",
hour: 14,
minute: 45,
snapshotsToKeep: 3
}
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshotPolicies.beginUpdateAndWait(
resourceGroupName,
accountName,
snapshotPolicyName,
body
);
console.log(result);
}
snapshotPoliciesUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* 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, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create the specified snapshot within the given volume
*
* @summary Create the specified snapshot within the given volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Create.json
*/
async function snapshotsCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const snapshotName = "snapshot1";
const body: Snapshot = { location: "eastus" };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshots.beginCreateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
snapshotName,
body
);
console.log(result);
}
snapshotsCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete snapshot
*
* @summary Delete snapshot
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Delete.json
*/
async function snapshotsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const snapshotName = "snapshot1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshots.beginDeleteAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
snapshotName
);
console.log(result);
}
snapshotsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get details of the specified snapshot
*
* @summary Get details of the specified snapshot
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Get.json
*/
async function snapshotsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const snapshotName = "snapshot1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshots.get(
resourceGroupName,
accountName,
poolName,
volumeName,
snapshotName
);
console.log(result);
}
snapshotsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all snapshots associated with the volume
*
* @summary List all snapshots associated with the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_List.json
*/
async function snapshotsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.snapshots.list(
resourceGroupName,
accountName,
poolName,
volumeName
)) {
resArray.push(item);
}
console.log(resArray);
}
snapshotsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,46 @@
/*
* 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 {
SnapshotRestoreFiles,
NetAppManagementClient
} from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Restore the specified files from the specified snapshot to the active filesystem
*
* @summary Restore the specified files from the specified snapshot to the active filesystem
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_SingleFileRestore.json
*/
async function snapshotsSingleFileRestore() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const snapshotName = "snapshot1";
const body: SnapshotRestoreFiles = {
filePaths: ["/dir1/customer1.db", "/dir1/customer2.db"]
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshots.beginRestoreFilesAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
snapshotName,
body
);
console.log(result);
}
snapshotsSingleFileRestore().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch a snapshot
*
* @summary Patch a snapshot
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Update.json
*/
async function snapshotsUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const snapshotName = "snapshot1";
const body: Record<string, unknown> = {};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.snapshots.beginUpdateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
snapshotName,
body
);
console.log(result);
}
snapshotsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* 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 { SubvolumeInfo, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Creates a subvolume in the path or clones the subvolume mentioned in the parentPath
*
* @summary Creates a subvolume in the path or clones the subvolume mentioned in the parentPath
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Create.json
*/
async function subvolumesCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const subvolumeName = "subvolume1";
const body: SubvolumeInfo = { path: "/subvolumePath" };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.subvolumes.beginCreateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
subvolumeName,
body
);
console.log(result);
}
subvolumesCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete subvolume
*
* @summary Delete subvolume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Delete.json
*/
async function subvolumesDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const subvolumeName = "subvolume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.subvolumes.beginDeleteAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
subvolumeName
);
console.log(result);
}
subvolumesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get details of the specified subvolume
*
* @summary Get details of the specified subvolume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Metadata.json
*/
async function subvolumesMetadata() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const subvolumeName = "subvolume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.subvolumes.beginGetMetadataAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
subvolumeName
);
console.log(result);
}
subvolumesMetadata().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Returns the path associated with the subvolumeName provided
*
* @summary Returns the path associated with the subvolumeName provided
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Get.json
*/
async function subvolumesGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const subvolumeName = "subvolume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.subvolumes.get(
resourceGroupName,
accountName,
poolName,
volumeName,
subvolumeName
);
console.log(result);
}
subvolumesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Returns a list of the subvolumes in the volume
*
* @summary Returns a list of the subvolumes in the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_List.json
*/
async function subvolumesList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.subvolumes.listByVolume(
resourceGroupName,
accountName,
poolName,
volumeName
)) {
resArray.push(item);
}
console.log(resArray);
}
subvolumesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,44 @@
/*
* 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 {
SubvolumePatchRequest,
NetAppManagementClient
} from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch a subvolume
*
* @summary Patch a subvolume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Update.json
*/
async function subvolumesUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const subvolumeName = "subvolume1";
const body: SubvolumePatchRequest = { path: "/subvolumePath" };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.subvolumes.beginUpdateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
subvolumeName,
body
);
console.log(result);
}
subvolumesUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List vaults for a Netapp Account
*
* @summary List vaults for a Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Vaults_List.json
*/
async function vaultsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.vaults.list(resourceGroupName, accountName)) {
resArray.push(item);
}
console.log(resArray);
}
vaultsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,89 @@
/*
* 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 { VolumeGroupDetails, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create a volume group along with specified volumes
*
* @summary Create a volume group along with specified volumes
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Create.json
*/
async function volumeGroupsCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const volumeGroupName = "group1";
const body: VolumeGroupDetails = {
groupMetaData: {
applicationIdentifier: "DEV",
applicationType: "SAP-HANA",
deploymentSpecId: "fb04dbeb-005d-2703-197e-6208dfadb5d9",
groupDescription: "Volume group"
},
location: "westus",
volumes: [
{
name: "testVol1",
capacityPoolResourceId:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1",
creationToken: "testVol1",
proximityPlacementGroup:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg",
serviceLevel: "Premium",
subnetId:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
throughputMibps: 10,
usageThreshold: 107374182400,
volumeSpecName: "data"
},
{
name: "testVol2",
capacityPoolResourceId:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1",
creationToken: "testVol2",
proximityPlacementGroup:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg",
serviceLevel: "Premium",
subnetId:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
throughputMibps: 10,
usageThreshold: 107374182400,
volumeSpecName: "log"
},
{
name: "testVol3",
capacityPoolResourceId:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1",
creationToken: "testVol3",
proximityPlacementGroup:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg",
serviceLevel: "Premium",
subnetId:
"/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
throughputMibps: 10,
usageThreshold: 107374182400,
volumeSpecName: "shared"
}
]
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumeGroups.beginCreateAndWait(
resourceGroupName,
accountName,
volumeGroupName,
body
);
console.log(result);
}
volumeGroupsCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified volume group only if there are no volumes under volume group.
*
* @summary Delete the specified volume group only if there are no volumes under volume group.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Delete.json
*/
async function volumeGroupsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const volumeGroupName = "group1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumeGroups.beginDeleteAndWait(
resourceGroupName,
accountName,
volumeGroupName
);
console.log(result);
}
volumeGroupsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get details of the specified volume group
*
* @summary Get details of the specified volume group
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Get.json
*/
async function volumeGroupsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const volumeGroupName = "group1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumeGroups.get(
resourceGroupName,
accountName,
volumeGroupName
);
console.log(result);
}
volumeGroupsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,36 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all volume groups for given account
*
* @summary List all volume groups for given account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_List.json
*/
async function volumeGroupsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.volumeGroups.listByNetAppAccount(
resourceGroupName,
accountName
)) {
resArray.push(item);
}
console.log(resArray);
}
volumeGroupsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* 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 { AuthorizeRequest, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Authorize the replication connection on the source volume
*
* @summary Authorize the replication connection on the source volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_AuthorizeReplication.json
*/
async function volumesAuthorizeReplication() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const body: AuthorizeRequest = {
remoteVolumeResourceId:
"/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginAuthorizeReplicationAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
body
);
console.log(result);
}
volumesAuthorizeReplication().catch(console.error);

Просмотреть файл

@ -0,0 +1,44 @@
/*
* 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 {
BreakReplicationRequest,
VolumesBreakReplicationOptionalParams,
NetAppManagementClient
} from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Break the replication connection on the destination volume
*
* @summary Break the replication connection on the destination volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BreakReplication.json
*/
async function volumesBreakReplication() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const body: BreakReplicationRequest = { forceBreakReplication: false };
const options: VolumesBreakReplicationOptionalParams = { body };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginBreakReplicationAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
options
);
console.log(result);
}
volumesBreakReplication().catch(console.error);

Просмотреть файл

@ -0,0 +1,48 @@
/*
* 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, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Create or update the specified volume within the capacity pool
*
* @summary Create or update the specified volume within the capacity pool
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_CreateOrUpdate.json
*/
async function volumesCreateOrUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const body: Volume = {
creationToken: "my-unique-file-path",
encryptionKeySource: "Microsoft.KeyVault",
location: "eastus",
serviceLevel: "Premium",
subnetId:
"/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
throughputMibps: 128,
usageThreshold: 107374182400
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginCreateOrUpdateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
body
);
console.log(result);
}
volumesCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the replication connection on the destination volume, and send release to the source replication
*
* @summary Delete the replication connection on the destination volume, and send release to the source replication
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_DeleteReplication.json
*/
async function volumesDeleteReplication() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginDeleteReplicationAndWait(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesDeleteReplication().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Delete the specified volume
*
* @summary Delete the specified volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Delete.json
*/
async function volumesDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginDeleteAndWait(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the details of the specified volume
*
* @summary Get the details of the specified volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Get.json
*/
async function volumesGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.get(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,38 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to List all volumes within the capacity pool
*
* @summary List all volumes within the capacity pool
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_List.json
*/
async function volumesList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.volumes.list(
resourceGroupName,
accountName,
poolName
)) {
resArray.push(item);
}
console.log(resArray);
}
volumesList().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* 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 { PoolChangeRequest, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Moves volume to another pool
*
* @summary Moves volume to another pool
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_PoolChange.json
*/
async function volumesAuthorizeReplication() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const body: PoolChangeRequest = {
newPoolResourceId:
"/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginPoolChangeAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
body
);
console.log(result);
}
volumesAuthorizeReplication().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Re-Initializes the replication connection on the destination volume
*
* @summary Re-Initializes the replication connection on the destination volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReInitializeReplication.json
*/
async function volumesReInitializeReplication() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginReInitializeReplicationAndWait(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesReInitializeReplication().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Get the status of the replication
*
* @summary Get the status of the replication
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReplicationStatus.json
*/
async function volumesReplicationStatus() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.replicationStatus(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesReplicationStatus().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.
*
* @summary Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ResyncReplication.json
*/
async function volumesResyncReplication() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginResyncReplicationAndWait(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesResyncReplication().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* 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 { VolumeRevert, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Revert a volume to the snapshot specified in the body
*
* @summary Revert a volume to the snapshot specified in the body
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Revert.json
*/
async function volumesRevert() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const body: VolumeRevert = {
snapshotId:
"/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginRevertAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
body
);
console.log(result);
}
volumesRevert().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { VolumePatch, NetAppManagementClient } from "@azure/arm-netapp";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to Patch the specified volume
*
* @summary Patch the specified volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Update.json
*/
async function volumesUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const body: VolumePatch = {};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.volumes.beginUpdateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
body
);
console.log(result);
}
volumesUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,184 @@
# client library samples for JavaScript
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
| **File Name** | **Description** |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [accountBackupsDeleteSample.js][accountbackupsdeletesample] | Delete the specified Backup for a Netapp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Delete.json |
| [accountBackupsGetSample.js][accountbackupsgetsample] | Gets the specified backup for a Netapp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Get.json |
| [accountBackupsListSample.js][accountbackupslistsample] | List all Backups for a Netapp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_List.json |
| [accountsCreateOrUpdateSample.js][accountscreateorupdatesample] | Create or update the specified NetApp account within the resource group x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_CreateOrUpdate.json |
| [accountsDeleteSample.js][accountsdeletesample] | Delete the specified NetApp account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Delete.json |
| [accountsGetSample.js][accountsgetsample] | Get the NetApp account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Get.json |
| [accountsListBySubscriptionSample.js][accountslistbysubscriptionsample] | List and describe all NetApp accounts in the subscription. x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json |
| [accountsListSample.js][accountslistsample] | List and describe all NetApp accounts in the resource group. x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json |
| [accountsUpdateSample.js][accountsupdatesample] | Patch the specified NetApp account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Update.json |
| [backupPoliciesCreateSample.js][backuppoliciescreatesample] | Create a backup policy for Netapp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Create.json |
| [backupPoliciesDeleteSample.js][backuppoliciesdeletesample] | Delete backup policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Delete.json |
| [backupPoliciesGetSample.js][backuppoliciesgetsample] | Get a particular backup Policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Get.json |
| [backupPoliciesListSample.js][backuppolicieslistsample] | List backup policies for Netapp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_List.json |
| [backupPoliciesUpdateSample.js][backuppoliciesupdatesample] | Patch a backup policy for Netapp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Update.json |
| [backupsCreateSample.js][backupscreatesample] | Create a backup for the volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Create.json |
| [backupsDeleteSample.js][backupsdeletesample] | Delete a backup of the volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Delete.json |
| [backupsGetSample.js][backupsgetsample] | Gets the specified backup of the volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Get.json |
| [backupsGetStatusSample.js][backupsgetstatussample] | Get the status of the backup for a volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BackupStatus.json |
| [backupsGetVolumeRestoreStatusSample.js][backupsgetvolumerestorestatussample] | Get the status of the restore for a volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_RestoreStatus.json |
| [backupsListSample.js][backupslistsample] | List all backups for a volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_List.json |
| [backupsUpdateSample.js][backupsupdatesample] | Patch a backup for the volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Update.json |
| [netAppResourceCheckFilePathAvailabilitySample.js][netappresourcecheckfilepathavailabilitysample] | Check if a file path is available. x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckFilePathAvailability.json |
| [netAppResourceCheckNameAvailabilitySample.js][netappresourcechecknameavailabilitysample] | Check if a resource name is available. x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckNameAvailability.json |
| [netAppResourceCheckQuotaAvailabilitySample.js][netappresourcecheckquotaavailabilitysample] | Check if a quota is available. x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckQuotaAvailability.json |
| [netAppResourceQuotaLimitsGetSample.js][netappresourcequotalimitsgetsample] | Get the default and current subscription quota limit x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_Get.json |
| [netAppResourceQuotaLimitsListSample.js][netappresourcequotalimitslistsample] | Get the default and current limits for quotas x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/QuotaLimits_List.json |
| [operationsListSample.js][operationslistsample] | Lists all of the available Microsoft.NetApp Rest API operations x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/OperationList.json |
| [poolsCreateOrUpdateSample.js][poolscreateorupdatesample] | Create or Update a capacity pool x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_CreateOrUpdate.json |
| [poolsDeleteSample.js][poolsdeletesample] | Delete the specified capacity pool x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Delete.json |
| [poolsGetSample.js][poolsgetsample] | Get details of the specified capacity pool x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Get.json |
| [poolsListSample.js][poolslistsample] | List all capacity pools in the NetApp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_List.json |
| [poolsUpdateSample.js][poolsupdatesample] | Patch the specified capacity pool x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Pools_Update.json |
| [snapshotPoliciesCreateSample.js][snapshotpoliciescreatesample] | Create a snapshot policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Create.json |
| [snapshotPoliciesDeleteSample.js][snapshotpoliciesdeletesample] | Delete snapshot policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Delete.json |
| [snapshotPoliciesGetSample.js][snapshotpoliciesgetsample] | Get a snapshot Policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Get.json |
| [snapshotPoliciesListSample.js][snapshotpolicieslistsample] | List snapshot policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_List.json |
| [snapshotPoliciesListVolumesSample.js][snapshotpolicieslistvolumessample] | Get volumes associated with snapshot policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_ListVolumes.json |
| [snapshotPoliciesUpdateSample.js][snapshotpoliciesupdatesample] | Patch a snapshot policy x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/SnapshotPolicies_Update.json |
| [snapshotsCreateSample.js][snapshotscreatesample] | Create the specified snapshot within the given volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Create.json |
| [snapshotsDeleteSample.js][snapshotsdeletesample] | Delete snapshot x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Delete.json |
| [snapshotsGetSample.js][snapshotsgetsample] | Get details of the specified snapshot x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Get.json |
| [snapshotsListSample.js][snapshotslistsample] | List all snapshots associated with the volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_List.json |
| [snapshotsRestoreFilesSample.js][snapshotsrestorefilessample] | Restore the specified files from the specified snapshot to the active filesystem x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_SingleFileRestore.json |
| [snapshotsUpdateSample.js][snapshotsupdatesample] | Patch a snapshot x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Snapshots_Update.json |
| [subvolumesCreateSample.js][subvolumescreatesample] | Creates a subvolume in the path or clones the subvolume mentioned in the parentPath x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Create.json |
| [subvolumesDeleteSample.js][subvolumesdeletesample] | Delete subvolume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Delete.json |
| [subvolumesGetMetadataSample.js][subvolumesgetmetadatasample] | Get details of the specified subvolume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Metadata.json |
| [subvolumesGetSample.js][subvolumesgetsample] | Returns the path associated with the subvolumeName provided x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Get.json |
| [subvolumesListByVolumeSample.js][subvolumeslistbyvolumesample] | Returns a list of the subvolumes in the volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_List.json |
| [subvolumesUpdateSample.js][subvolumesupdatesample] | Patch a subvolume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Subvolumes_Update.json |
| [vaultsListSample.js][vaultslistsample] | List vaults for a Netapp Account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Vaults_List.json |
| [volumeGroupsCreateSample.js][volumegroupscreatesample] | Create a volume group along with specified volumes x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Create.json |
| [volumeGroupsDeleteSample.js][volumegroupsdeletesample] | Delete the specified volume group only if there are no volumes under volume group. x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Delete.json |
| [volumeGroupsGetSample.js][volumegroupsgetsample] | Get details of the specified volume group x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_Get.json |
| [volumeGroupsListByNetAppAccountSample.js][volumegroupslistbynetappaccountsample] | List all volume groups for given account x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/VolumeGroups_List.json |
| [volumesAuthorizeReplicationSample.js][volumesauthorizereplicationsample] | Authorize the replication connection on the source volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_AuthorizeReplication.json |
| [volumesBreakReplicationSample.js][volumesbreakreplicationsample] | Break the replication connection on the destination volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BreakReplication.json |
| [volumesCreateOrUpdateSample.js][volumescreateorupdatesample] | Create or update the specified volume within the capacity pool x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_CreateOrUpdate.json |
| [volumesDeleteReplicationSample.js][volumesdeletereplicationsample] | Delete the replication connection on the destination volume, and send release to the source replication x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_DeleteReplication.json |
| [volumesDeleteSample.js][volumesdeletesample] | Delete the specified volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Delete.json |
| [volumesGetSample.js][volumesgetsample] | Get the details of the specified volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Get.json |
| [volumesListSample.js][volumeslistsample] | List all volumes within the capacity pool x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_List.json |
| [volumesPoolChangeSample.js][volumespoolchangesample] | Moves volume to another pool x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_PoolChange.json |
| [volumesReInitializeReplicationSample.js][volumesreinitializereplicationsample] | Re-Initializes the replication connection on the destination volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReInitializeReplication.json |
| [volumesReplicationStatusSample.js][volumesreplicationstatussample] | Get the status of the replication x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ReplicationStatus.json |
| [volumesResyncReplicationSample.js][volumesresyncreplicationsample] | Resync the connection on the destination volume. If the operation is ran on the source volume it will reverse-resync the connection and sync from destination to source. x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_ResyncReplication.json |
| [volumesRevertSample.js][volumesrevertsample] | Revert a volume to the snapshot specified in the body x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Revert.json |
| [volumesUpdateSample.js][volumesupdatesample] | Patch the specified volume x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_Update.json |
## Prerequisites
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
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 accountBackupsDeleteSample.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 node accountBackupsDeleteSample.js
```
## Next Steps
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
[accountbackupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountBackupsDeleteSample.js
[accountbackupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountBackupsGetSample.js
[accountbackupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountBackupsListSample.js
[accountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountsCreateOrUpdateSample.js
[accountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountsDeleteSample.js
[accountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountsGetSample.js
[accountslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountsListBySubscriptionSample.js
[accountslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountsListSample.js
[accountsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/accountsUpdateSample.js
[backuppoliciescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupPoliciesCreateSample.js
[backuppoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupPoliciesDeleteSample.js
[backuppoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupPoliciesGetSample.js
[backuppolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupPoliciesListSample.js
[backuppoliciesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupPoliciesUpdateSample.js
[backupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupsCreateSample.js
[backupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupsDeleteSample.js
[backupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupsGetSample.js
[backupsgetstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupsGetStatusSample.js
[backupsgetvolumerestorestatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupsGetVolumeRestoreStatusSample.js
[backupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupsListSample.js
[backupsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/backupsUpdateSample.js
[netappresourcecheckfilepathavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/netAppResourceCheckFilePathAvailabilitySample.js
[netappresourcechecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/netAppResourceCheckNameAvailabilitySample.js
[netappresourcecheckquotaavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/netAppResourceCheckQuotaAvailabilitySample.js
[netappresourcequotalimitsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/netAppResourceQuotaLimitsGetSample.js
[netappresourcequotalimitslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/netAppResourceQuotaLimitsListSample.js
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/operationsListSample.js
[poolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/poolsCreateOrUpdateSample.js
[poolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/poolsDeleteSample.js
[poolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/poolsGetSample.js
[poolslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/poolsListSample.js
[poolsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/poolsUpdateSample.js
[snapshotpoliciescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotPoliciesCreateSample.js
[snapshotpoliciesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotPoliciesDeleteSample.js
[snapshotpoliciesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotPoliciesGetSample.js
[snapshotpolicieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotPoliciesListSample.js
[snapshotpolicieslistvolumessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotPoliciesListVolumesSample.js
[snapshotpoliciesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotPoliciesUpdateSample.js
[snapshotscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotsCreateSample.js
[snapshotsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotsDeleteSample.js
[snapshotsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotsGetSample.js
[snapshotslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotsListSample.js
[snapshotsrestorefilessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotsRestoreFilesSample.js
[snapshotsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/snapshotsUpdateSample.js
[subvolumescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/subvolumesCreateSample.js
[subvolumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/subvolumesDeleteSample.js
[subvolumesgetmetadatasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/subvolumesGetMetadataSample.js
[subvolumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/subvolumesGetSample.js
[subvolumeslistbyvolumesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/subvolumesListByVolumeSample.js
[subvolumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/subvolumesUpdateSample.js
[vaultslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/vaultsListSample.js
[volumegroupscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumeGroupsCreateSample.js
[volumegroupsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumeGroupsDeleteSample.js
[volumegroupsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumeGroupsGetSample.js
[volumegroupslistbynetappaccountsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumeGroupsListByNetAppAccountSample.js
[volumesauthorizereplicationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesAuthorizeReplicationSample.js
[volumesbreakreplicationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesBreakReplicationSample.js
[volumescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesCreateOrUpdateSample.js
[volumesdeletereplicationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesDeleteReplicationSample.js
[volumesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesDeleteSample.js
[volumesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesGetSample.js
[volumeslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesListSample.js
[volumespoolchangesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesPoolChangeSample.js
[volumesreinitializereplicationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesReInitializeReplicationSample.js
[volumesreplicationstatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesReplicationStatusSample.js
[volumesresyncreplicationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesResyncReplicationSample.js
[volumesrevertsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesRevertSample.js
[volumesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/netapp/arm-netapp/samples/v15/javascript/volumesUpdateSample.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-netapp?view=azure-node-preview
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/netapp/arm-netapp/README.md

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete the specified Backup for a Netapp Account
*
* @summary Delete the specified Backup for a Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Delete.json
*/
async function accountBackupsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "resourceGroup";
const accountName = "accountName";
const backupName = "backupName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accountBackups.beginDeleteAndWait(
resourceGroupName,
accountName,
backupName
);
console.log(result);
}
accountBackupsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the specified backup for a Netapp Account
*
* @summary Gets the specified backup for a Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_Get.json
*/
async function accountBackupsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupName = "backup1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accountBackups.get(resourceGroupName, accountName, backupName);
console.log(result);
}
accountBackupsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all Backups for a Netapp Account
*
* @summary List all Backups for a Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Account_List.json
*/
async function accountBackupsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.accountBackups.list(resourceGroupName, accountName)) {
resArray.push(item);
}
console.log(resArray);
}
accountBackupsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,51 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create or update the specified NetApp account within the resource group
*
* @summary Create or update the specified NetApp account within the resource group
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_CreateOrUpdate.json
*/
async function accountsCreateOrUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const body = {
activeDirectories: [
{
aesEncryption: true,
dns: "10.10.10.3, 10.10.10.4",
domain: "10.10.10.3",
ldapOverTLS: false,
ldapSigning: false,
organizationalUnit: "OU=Engineering",
password: "ad_password",
site: "SiteName",
smbServerName: "SMBServer",
username: "ad_user_name",
},
],
location: "eastus",
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.beginCreateOrUpdateAndWait(
resourceGroupName,
accountName,
body
);
console.log(result);
}
accountsCreateOrUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete the specified NetApp account
*
* @summary Delete the specified NetApp account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Delete.json
*/
async function accountsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.beginDeleteAndWait(resourceGroupName, accountName);
console.log(result);
}
accountsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,30 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the NetApp account
*
* @summary Get the NetApp account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Get.json
*/
async function accountsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.get(resourceGroupName, accountName);
console.log(result);
}
accountsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List and describe all NetApp accounts in the subscription.
*
* @summary List and describe all NetApp accounts in the subscription.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json
*/
async function accountsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.accounts.listBySubscription()) {
resArray.push(item);
}
console.log(resArray);
}
accountsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List and describe all NetApp accounts in the resource group.
*
* @summary List and describe all NetApp accounts in the resource group.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_List.json
*/
async function accountsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.accounts.list(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
accountsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Patch the specified NetApp account
*
* @summary Patch the specified NetApp account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Accounts_Update.json
*/
async function accountsUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const body = { tags: { tag1: "Value1" } };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.accounts.beginUpdateAndWait(resourceGroupName, accountName, body);
console.log(result);
}
accountsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create a backup policy for Netapp Account
*
* @summary Create a backup policy for Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Create.json
*/
async function backupPoliciesCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupPolicyName = "backupPolicyName";
const body = {
dailyBackupsToKeep: 10,
enabled: true,
location: "westus",
monthlyBackupsToKeep: 10,
weeklyBackupsToKeep: 10,
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.beginCreateAndWait(
resourceGroupName,
accountName,
backupPolicyName,
body
);
console.log(result);
}
backupPoliciesCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,35 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete backup policy
*
* @summary Delete backup policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Delete.json
*/
async function backupsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "resourceGroup";
const accountName = "accountName";
const backupPolicyName = "backupPolicyName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.beginDeleteAndWait(
resourceGroupName,
accountName,
backupPolicyName
);
console.log(result);
}
backupsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,31 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a particular backup Policy
*
* @summary Get a particular backup Policy
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Get.json
*/
async function backupsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupPolicyName = "backupPolicyName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.get(resourceGroupName, accountName, backupPolicyName);
console.log(result);
}
backupsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,33 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List backup policies for Netapp Account
*
* @summary List backup policies for Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_List.json
*/
async function backupsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.backupPolicies.list(resourceGroupName, accountName)) {
resArray.push(item);
}
console.log(resArray);
}
backupsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,43 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Patch a backup policy for Netapp Account
*
* @summary Patch a backup policy for Netapp Account
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/BackupPolicies_Update.json
*/
async function backupPoliciesUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const backupPolicyName = "backupPolicyName";
const body = {
dailyBackupsToKeep: 5,
enabled: false,
location: "westus",
monthlyBackupsToKeep: 10,
weeklyBackupsToKeep: 10,
};
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backupPolicies.beginUpdateAndWait(
resourceGroupName,
accountName,
backupPolicyName,
body
);
console.log(result);
}
backupPoliciesUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,41 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create a backup for the volume
*
* @summary Create a backup for the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Create.json
*/
async function backupsCreate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const backupName = "backup1";
const body = { label: "myLabel", location: "eastus" };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.beginCreateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName,
body
);
console.log(result);
}
backupsCreate().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Delete a backup of the volume
*
* @summary Delete a backup of the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Delete.json
*/
async function backupsDelete() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "resourceGroup";
const accountName = "accountName";
const poolName = "poolName";
const volumeName = "volumeName";
const backupName = "backupName";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.beginDeleteAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName
);
console.log(result);
}
backupsDelete().catch(console.error);

Просмотреть файл

@ -0,0 +1,39 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the specified backup of the volume
*
* @summary Gets the specified backup of the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Get.json
*/
async function backupsGet() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const backupName = "backup1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.get(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName
);
console.log(result);
}
backupsGet().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the status of the backup for a volume
*
* @summary Get the status of the backup for a volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_BackupStatus.json
*/
async function volumesBackupStatus() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.getStatus(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesBackupStatus().catch(console.error);

Просмотреть файл

@ -0,0 +1,37 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the status of the restore for a volume
*
* @summary Get the status of the restore for a volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Volumes_RestoreStatus.json
*/
async function volumesRestoreStatus() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.getVolumeRestoreStatus(
resourceGroupName,
accountName,
poolName,
volumeName
);
console.log(result);
}
volumesRestoreStatus().catch(console.error);

Просмотреть файл

@ -0,0 +1,40 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all backups for a volume
*
* @summary List all backups for a volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_List.json
*/
async function backupsList() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.backups.list(
resourceGroupName,
accountName,
poolName,
volumeName
)) {
resArray.push(item);
}
console.log(resArray);
}
backupsList().catch(console.error);

Просмотреть файл

@ -0,0 +1,42 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Patch a backup for the volume
*
* @summary Patch a backup for the volume
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/Backups_Update.json
*/
async function backupsUpdate() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const resourceGroupName = "myRG";
const accountName = "account1";
const poolName = "pool1";
const volumeName = "volume1";
const backupName = "backup1";
const body = {};
const options = { body };
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.backups.beginUpdateAndWait(
resourceGroupName,
accountName,
poolName,
volumeName,
backupName,
options
);
console.log(result);
}
backupsUpdate().catch(console.error);

Просмотреть файл

@ -0,0 +1,32 @@
/*
* 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 { NetAppManagementClient } = require("@azure/arm-netapp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Check if a file path is available.
*
* @summary Check if a file path is available.
* x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2021-10-01/examples/CheckFilePathAvailability.json
*/
async function checkFilePathAvailability() {
const subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9";
const location = "eastus";
const name = "my-exact-filepth";
const subnetId =
"/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3";
const credential = new DefaultAzureCredential();
const client = new NetAppManagementClient(credential, subscriptionId);
const result = await client.netAppResource.checkFilePathAvailability(location, name, subnetId);
console.log(result);
}
checkFilePathAvailability().catch(console.error);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше