diff --git a/sdk/netapp/arm-netapp/LICENSE.txt b/sdk/netapp/arm-netapp/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/netapp/arm-netapp/LICENSE.txt +++ b/sdk/netapp/arm-netapp/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/netapp/arm-netapp/package.json b/sdk/netapp/arm-netapp/package.json index 327852cd73d5..6a1769af9017 100644 --- a/sdk/netapp/arm-netapp/package.json +++ b/sdk/netapp/arm-netapp/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-netapp", "author": "Microsoft Corporation", "description": "AzureNetAppFilesManagementClient Library with typescript type definitions for node.js and browser.", - "version": "7.0.0", + "version": "8.0.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.0.1", "@azure/ms-rest-js": "^2.0.4", diff --git a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts index 6dff5fe04b8c..16c0f6bd13d3 100644 --- a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts +++ b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts @@ -22,7 +22,6 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC accounts: operations.Accounts; pools: operations.Pools; volumes: operations.Volumes; - mountTargets: operations.MountTargets; snapshots: operations.Snapshots; /** @@ -39,7 +38,6 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC this.accounts = new operations.Accounts(this); this.pools = new operations.Pools(this); this.volumes = new operations.Volumes(this); - this.mountTargets = new operations.MountTargets(this); this.snapshots = new operations.Snapshots(this); } } diff --git a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts index be1c17233cc1..c5064991a8c2 100644 --- a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts +++ b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-netapp"; -const packageVersion = "7.0.0"; +const packageVersion = "8.0.0"; export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -38,14 +38,14 @@ export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureSe if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2019-10-01'; + this.apiVersion = '2019-11-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -53,10 +53,10 @@ export class AzureNetAppFilesManagementClientContext extends msRestAzure.AzureSe this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/netapp/arm-netapp/src/models/accountsMappers.ts b/sdk/netapp/arm-netapp/src/models/accountsMappers.ts index 3cfcfa2a19f6..996b978b7718 100644 --- a/sdk/netapp/arm-netapp/src/models/accountsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/accountsMappers.ts @@ -13,12 +13,12 @@ export { CapacityPoolPatch, CloudError, ExportPolicyRule, + MountTarget, NetAppAccount, NetAppAccountList, NetAppAccountPatch, ReplicationObject, Snapshot, - SnapshotPatch, Volume, VolumePatch, VolumePatchPropertiesExportPolicy, diff --git a/sdk/netapp/arm-netapp/src/models/index.ts b/sdk/netapp/arm-netapp/src/models/index.ts index 2feca57b415d..7351a335cdd3 100644 --- a/sdk/netapp/arm-netapp/src/models/index.ts +++ b/sdk/netapp/arm-netapp/src/models/index.ts @@ -203,6 +203,10 @@ export interface ActiveDirectory { * The Organizational Unit (OU) within the Windows Active Directory */ organizationalUnit?: string; + /** + * The Active Directory site the service will limit Domain Controller discovery to + */ + site?: string; } /** @@ -415,6 +419,53 @@ export interface VolumePropertiesExportPolicy { rules?: ExportPolicyRule[]; } +/** + * Mount Target + */ +export interface MountTarget { + /** + * Resource location + */ + location: string; + /** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * mountTargetId. UUID v4 used to identify the MountTarget + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly mountTargetId?: string; + /** + * fileSystemId. UUID v4 used to identify the MountTarget + */ + fileSystemId: string; + /** + * ipAddress. The mount target's IPv4 address + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly ipAddress?: string; + /** + * smbServerFQDN. The SMB server's Fully Qualified Domain Name, FQDN + */ + smbServerFqdn?: string; +} + /** * Replication properties */ @@ -531,7 +582,7 @@ export interface Volume extends BaseResource { /** * mountTargets. List of mount targets */ - mountTargets?: any; + mountTargets?: MountTarget[]; /** * What type of volume is this */ @@ -629,75 +680,13 @@ export interface VolumePatch extends BaseResource { } /** - * Mount Target + * List of Mount Targets */ -export interface MountTarget { - /** - * Resource location - */ - location: string; - /** - * Resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * mountTargetId. UUID v4 used to identify the MountTarget - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly mountTargetId?: string; - /** - * fileSystemId. UUID v4 used to identify the MountTarget - */ - fileSystemId: string; - /** - * ipAddress. The mount target's IPv4 address - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly ipAddress?: string; - /** - * subnet. The subnet - */ - subnet?: string; - /** - * startIp. The start of IPv4 address range to use when creating a new mount target - */ - startIp?: string; - /** - * endIp. The end of IPv4 address range to use when creating a new mount target - */ - endIp?: string; - /** - * gateway. The gateway of the IPv4 address range to use when creating a new mount target - */ - gateway?: string; - /** - * netmask. The netmask of the IPv4 address range to use when creating a new mount target - */ - netmask?: string; - /** - * smbServerFQDN. The SMB server's Fully Qualified Domain Name, FQDN - */ - smbServerFqdn?: string; +export interface MountTargetList { /** - * Azure lifecycle management - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A list of Mount targets */ - readonly provisioningState?: string; + value?: MountTarget[]; } /** @@ -723,10 +712,6 @@ export interface Snapshot extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; /** * snapshotId. UUID v4 used to identify the Snapshot * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -749,13 +734,13 @@ export interface Snapshot extends BaseResource { } /** - * Snapshot patch + * revert a volume to the snapshot */ -export interface SnapshotPatch extends BaseResource { +export interface VolumeRevert { /** - * Resource tags + * Resource id of the snapshot */ - tags?: { [propertyName: string]: string }; + snapshotId?: string; } /** @@ -763,17 +748,27 @@ export interface SnapshotPatch extends BaseResource { */ export interface AuthorizeRequest { /** - * Resource id + * Resource id of the remote volume */ remoteVolumeResourceId?: string; } +/** + * Optional Parameters. + */ +export interface VolumesRevertOptionalParams extends msRest.RequestOptionsBase { + /** + * Resource id of the snapshot + */ + snapshotId?: string; +} + /** * Optional Parameters. */ export interface VolumesAuthorizeReplicationOptionalParams extends msRest.RequestOptionsBase { /** - * Resource id + * Resource id of the remote volume */ remoteVolumeResourceId?: string; } @@ -781,11 +776,41 @@ export interface VolumesAuthorizeReplicationOptionalParams extends msRest.Reques /** * Optional Parameters. */ -export interface SnapshotsUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface VolumesBeginRevertOptionalParams extends msRest.RequestOptionsBase { /** - * Resource tags + * Resource id of the snapshot */ - tags?: { [propertyName: string]: string }; + snapshotId?: string; +} + +/** + * Optional Parameters. + */ +export interface VolumesBeginAuthorizeReplicationOptionalParams extends msRest.RequestOptionsBase { + /** + * Resource id of the remote volume + */ + remoteVolumeResourceId?: string; +} + +/** + * Optional Parameters. + */ +export interface SnapshotsCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * fileSystemId UUID v4 used to identify the FileSystem + */ + fileSystemId?: string; +} + +/** + * Optional Parameters. + */ +export interface SnapshotsBeginCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * fileSystemId UUID v4 used to identify the FileSystem + */ + fileSystemId?: string; } /** @@ -828,14 +853,6 @@ export interface CapacityPoolList extends Array { export interface VolumeList extends Array { } -/** - * @interface - * List of Mount Targets - * @extends Array - */ -export interface MountTargetList extends Array { -} - /** * @interface * List of Snapshots @@ -1163,6 +1180,26 @@ export type PoolsBeginCreateOrUpdateResponse = CapacityPool & { }; }; +/** + * Contains response data for the beginUpdate operation. + */ +export type PoolsBeginUpdateResponse = CapacityPool & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CapacityPool; + }; +}; + /** * Contains response data for the list operation. */ @@ -1284,9 +1321,9 @@ export type VolumesBeginCreateOrUpdateResponse = Volume & { }; /** - * Contains response data for the list operation. + * Contains response data for the beginUpdate operation. */ -export type MountTargetsListResponse = MountTargetList & { +export type VolumesBeginUpdateResponse = Volume & { /** * The underlying HTTP response. */ @@ -1299,7 +1336,7 @@ export type MountTargetsListResponse = MountTargetList & { /** * The response body as parsed JSON or XML */ - parsedBody: MountTargetList; + parsedBody: Volume; }; }; @@ -1402,3 +1439,23 @@ export type SnapshotsBeginCreateResponse = Snapshot & { parsedBody: Snapshot; }; }; + +/** + * Contains response data for the beginUpdate operation. + */ +export type SnapshotsBeginUpdateResponse = Snapshot & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Snapshot; + }; +}; diff --git a/sdk/netapp/arm-netapp/src/models/mappers.ts b/sdk/netapp/arm-netapp/src/models/mappers.ts index a33d7d77cf91..ca14ed64076f 100644 --- a/sdk/netapp/arm-netapp/src/models/mappers.ts +++ b/sdk/netapp/arm-netapp/src/models/mappers.ts @@ -308,6 +308,12 @@ export const ActiveDirectory: msRest.CompositeMapper = { type: { name: "String" } + }, + site: { + serializedName: "site", + type: { + name: "String" + } } } } @@ -675,6 +681,92 @@ export const VolumePropertiesExportPolicy: msRest.CompositeMapper = { } }; +export const MountTarget: msRest.CompositeMapper = { + serializedName: "mountTarget", + type: { + name: "Composite", + className: "MountTarget", + modelProperties: { + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + mountTargetId: { + readOnly: true, + serializedName: "properties.mountTargetId", + constraints: { + MaxLength: 36, + MinLength: 36, + Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ + }, + type: { + name: "String" + } + }, + fileSystemId: { + required: true, + serializedName: "properties.fileSystemId", + constraints: { + MaxLength: 36, + MinLength: 36, + Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ + }, + type: { + name: "String" + } + }, + ipAddress: { + readOnly: true, + serializedName: "properties.ipAddress", + type: { + name: "String" + } + }, + smbServerFqdn: { + serializedName: "properties.smbServerFqdn", + type: { + name: "String" + } + } + } + } +}; + export const ReplicationObject: msRest.CompositeMapper = { serializedName: "replicationObject", type: { @@ -794,6 +886,11 @@ export const Volume: msRest.CompositeMapper = { creationToken: { required: true, serializedName: "properties.creationToken", + constraints: { + MaxLength: 80, + MinLength: 1, + Pattern: /^[a-zA-Z][a-zA-Z0-9\-]{0,79}$/ + }, type: { name: "String" } @@ -875,7 +972,13 @@ export const Volume: msRest.CompositeMapper = { mountTargets: { serializedName: "properties.mountTargets", type: { - name: "Object" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountTarget" + } + } } }, volumeType: { @@ -1036,124 +1139,23 @@ export const VolumePatch: msRest.CompositeMapper = { } }; -export const MountTarget: msRest.CompositeMapper = { - serializedName: "mountTarget", +export const MountTargetList: msRest.CompositeMapper = { + serializedName: "mountTargetList", type: { name: "Composite", - className: "MountTarget", + className: "MountTargetList", modelProperties: { - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", + value: { + serializedName: "value", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "MountTarget" } } } - }, - mountTargetId: { - readOnly: true, - serializedName: "properties.mountTargetId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ - }, - type: { - name: "String" - } - }, - fileSystemId: { - required: true, - serializedName: "properties.fileSystemId", - constraints: { - MaxLength: 36, - MinLength: 36, - Pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/ - }, - type: { - name: "String" - } - }, - ipAddress: { - readOnly: true, - serializedName: "properties.ipAddress", - type: { - name: "String" - } - }, - subnet: { - serializedName: "properties.subnet", - type: { - name: "String" - } - }, - startIp: { - serializedName: "properties.startIp", - type: { - name: "String" - } - }, - endIp: { - serializedName: "properties.endIp", - type: { - name: "String" - } - }, - gateway: { - serializedName: "properties.gateway", - type: { - name: "String" - } - }, - netmask: { - serializedName: "properties.netmask", - type: { - name: "String" - } - }, - smbServerFqdn: { - serializedName: "properties.smbServerFqdn", - type: { - name: "String" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } } } } @@ -1193,17 +1195,6 @@ export const Snapshot: msRest.CompositeMapper = { name: "String" } }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, snapshotId: { readOnly: true, serializedName: "properties.snapshotId", @@ -1245,21 +1236,16 @@ export const Snapshot: msRest.CompositeMapper = { } }; -export const SnapshotPatch: msRest.CompositeMapper = { - serializedName: "snapshotPatch", +export const VolumeRevert: msRest.CompositeMapper = { + serializedName: "volumeRevert", type: { name: "Composite", - className: "SnapshotPatch", + className: "VolumeRevert", modelProperties: { - tags: { - serializedName: "tags", + snapshotId: { + serializedName: "snapshotId", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } } } @@ -1370,28 +1356,6 @@ export const VolumeList: msRest.CompositeMapper = { } }; -export const MountTargetList: msRest.CompositeMapper = { - serializedName: "mountTargetList", - type: { - name: "Composite", - className: "MountTargetList", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MountTarget" - } - } - } - } - } - } -}; - export const SnapshotsList: msRest.CompositeMapper = { serializedName: "snapshotsList", type: { diff --git a/sdk/netapp/arm-netapp/src/models/mountTargetsMappers.ts b/sdk/netapp/arm-netapp/src/models/mountTargetsMappers.ts deleted file mode 100644 index f4f7b767a9bc..000000000000 --- a/sdk/netapp/arm-netapp/src/models/mountTargetsMappers.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - CloudError, - MountTarget, - MountTargetList -} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/parameters.ts b/sdk/netapp/arm-netapp/src/models/parameters.ts index d8674d35aaad..a8abb6c6f048 100644 --- a/sdk/netapp/arm-netapp/src/models/parameters.ts +++ b/sdk/netapp/arm-netapp/src/models/parameters.ts @@ -35,7 +35,7 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", - defaultValue: '2019-10-01', + defaultValue: '2019-11-01', type: { name: "String" } @@ -56,6 +56,11 @@ export const poolName: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "poolName", + constraints: { + MaxLength: 64, + MinLength: 1, + Pattern: /^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$/ + }, type: { name: "String" } @@ -101,6 +106,11 @@ export const volumeName: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "volumeName", + constraints: { + MaxLength: 64, + MinLength: 1, + Pattern: /^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$/ + }, type: { name: "String" } diff --git a/sdk/netapp/arm-netapp/src/models/poolsMappers.ts b/sdk/netapp/arm-netapp/src/models/poolsMappers.ts index 4f827d921bb9..a2ce76177536 100644 --- a/sdk/netapp/arm-netapp/src/models/poolsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/poolsMappers.ts @@ -14,11 +14,11 @@ export { CapacityPoolPatch, CloudError, ExportPolicyRule, + MountTarget, NetAppAccount, NetAppAccountPatch, ReplicationObject, Snapshot, - SnapshotPatch, Volume, VolumePatch, VolumePatchPropertiesExportPolicy, diff --git a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts b/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts index 05cf00cde0c6..80554b0453b2 100644 --- a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts @@ -13,11 +13,11 @@ export { CapacityPoolPatch, CloudError, ExportPolicyRule, + MountTarget, NetAppAccount, NetAppAccountPatch, ReplicationObject, Snapshot, - SnapshotPatch, SnapshotsList, Volume, VolumePatch, diff --git a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts b/sdk/netapp/arm-netapp/src/models/volumesMappers.ts index 2d5984890d09..44dfbc8331f8 100644 --- a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/volumesMappers.ts @@ -14,16 +14,17 @@ export { CapacityPoolPatch, CloudError, ExportPolicyRule, + MountTarget, NetAppAccount, NetAppAccountPatch, ReplicationObject, ReplicationStatus, Snapshot, - SnapshotPatch, Volume, VolumeList, VolumePatch, VolumePatchPropertiesExportPolicy, VolumePropertiesDataProtection, - VolumePropertiesExportPolicy + VolumePropertiesExportPolicy, + VolumeRevert } from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/operations/index.ts b/sdk/netapp/arm-netapp/src/operations/index.ts index 52b452e86b33..b05a3467d352 100644 --- a/sdk/netapp/arm-netapp/src/operations/index.ts +++ b/sdk/netapp/arm-netapp/src/operations/index.ts @@ -13,5 +13,4 @@ export * from "./netAppResource"; export * from "./accounts"; export * from "./pools"; export * from "./volumes"; -export * from "./mountTargets"; export * from "./snapshots"; diff --git a/sdk/netapp/arm-netapp/src/operations/mountTargets.ts b/sdk/netapp/arm-netapp/src/operations/mountTargets.ts deleted file mode 100644 index 31bc2cf2287b..000000000000 --- a/sdk/netapp/arm-netapp/src/operations/mountTargets.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/mountTargetsMappers"; -import * as Parameters from "../models/parameters"; -import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; - -/** Class representing a MountTargets. */ -export class MountTargets { - private readonly client: AzureNetAppFilesManagementClientContext; - - /** - * Create a MountTargets. - * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. - */ - constructor(client: AzureNetAppFilesManagementClientContext) { - this.client = client; - } - - /** - * List all mount targets associated with the volume - * @summary Describe all mount targets - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - listOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.poolName, - Parameters.volumeName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MountTargetList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/netapp/arm-netapp/src/operations/pools.ts b/sdk/netapp/arm-netapp/src/operations/pools.ts index d6e190205762..41eb4a75e645 100644 --- a/sdk/netapp/arm-netapp/src/operations/pools.ts +++ b/sdk/netapp/arm-netapp/src/operations/pools.ts @@ -122,35 +122,9 @@ export class Pools { * @param [options] The optional parameters * @returns Promise */ - update(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param body Capacity pool object supplied in the body of the operation. - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param callback The callback - */ - update(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, callback: msRest.ServiceCallback): void; - /** - * @param body Capacity pool object supplied in the body of the operation. - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param options The optional parameters - * @param callback The callback - */ - update(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - body, - resourceGroupName, - accountName, - poolName, - options - }, - updateOperationSpec, - callback) as Promise; + update(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,accountName,poolName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -190,6 +164,29 @@ export class Pools { options); } + /** + * Patch the specified capacity pool + * @summary Update a capacity pool + * @param body Capacity pool object supplied in the body of the operation. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(body: Models.CapacityPoolPatch, resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + accountName, + poolName, + options + }, + beginUpdateOperationSpec, + options); + } + /** * Delete the specified capacity pool * @summary Delete a capacity pool @@ -265,8 +262,8 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", urlParameters: [ Parameters.subscriptionId, @@ -283,7 +280,7 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "body", mapper: { - ...Mappers.CapacityPoolPatch, + ...Mappers.CapacityPool, required: true } }, @@ -291,6 +288,9 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.CapacityPool }, + 201: { + bodyMapper: Mappers.CapacityPool + }, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -299,8 +299,8 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}", urlParameters: [ Parameters.subscriptionId, @@ -317,7 +317,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "body", mapper: { - ...Mappers.CapacityPool, + ...Mappers.CapacityPoolPatch, required: true } }, @@ -325,9 +325,6 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.CapacityPool }, - 201: { - bodyMapper: Mappers.CapacityPool - }, 202: {}, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/netapp/arm-netapp/src/operations/snapshots.ts b/sdk/netapp/arm-netapp/src/operations/snapshots.ts index 95e9c8c916bf..5875523b8c3e 100644 --- a/sdk/netapp/arm-netapp/src/operations/snapshots.ts +++ b/sdk/netapp/arm-netapp/src/operations/snapshots.ts @@ -116,23 +116,24 @@ export class Snapshots { /** * Create the specified snapshot within the given volume * @summary Create a snapshot - * @param body Snapshot object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param snapshotName The name of the mount target + * @param location Resource location * @param [options] The optional parameters * @returns Promise */ - create(body: Models.Snapshot, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(body,resourceGroupName,accountName,poolName,volumeName,snapshotName,options) + create(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: Models.SnapshotsCreateOptionalParams): Promise { + return this.beginCreate(resourceGroupName,accountName,poolName,volumeName,snapshotName,location,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Patch a snapshot * @summary Update a snapshot + * @param body Snapshot object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool @@ -141,59 +142,57 @@ export class Snapshots { * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: Models.SnapshotsUpdateOptionalParams): Promise; + update(body: any, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,accountName,poolName,volumeName,snapshotName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** + * Delete snapshot + * @summary Delete a snapshot * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param snapshotName The name of the mount target - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,poolName,volumeName,snapshotName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** + * Create the specified snapshot within the given volume + * @summary Create a snapshot * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param snapshotName The name of the mount target - * @param options The optional parameters - * @param callback The callback + * @param location Resource location + * @param [options] The optional parameters + * @returns Promise */ - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options: Models.SnapshotsUpdateOptionalParams, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: Models.SnapshotsUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: Models.SnapshotsBeginCreateOptionalParams): Promise { + return this.client.sendLRORequest( { resourceGroupName, accountName, poolName, volumeName, snapshotName, + location, options }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Delete snapshot - * @summary Delete a snapshot - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param snapshotName The name of the mount target - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,accountName,poolName,volumeName,snapshotName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + beginCreateOperationSpec, + options); } /** - * Create the specified snapshot within the given volume - * @summary Create a snapshot + * Patch a snapshot + * @summary Update a snapshot * @param body Snapshot object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account @@ -203,7 +202,7 @@ export class Snapshots { * @param [options] The optional parameters * @returns Promise */ - beginCreate(body: Models.Snapshot, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { + beginUpdate(body: any, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { body, @@ -214,7 +213,7 @@ export class Snapshots { snapshotName, options }, - beginCreateOperationSpec, + beginUpdateOperationSpec, options); } @@ -301,8 +300,8 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", urlParameters: [ Parameters.subscriptionId, @@ -320,18 +319,19 @@ const updateOperationSpec: msRest.OperationSpec = { ], requestBody: { parameterPath: { - tags: [ + location: "location", + fileSystemId: [ "options", - "tags" + "fileSystemId" ] }, mapper: { - ...Mappers.SnapshotPatch, + ...Mappers.Snapshot, required: true } }, responses: { - 200: { + 201: { bodyMapper: Mappers.Snapshot }, 202: {}, @@ -342,8 +342,8 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}", urlParameters: [ Parameters.subscriptionId, @@ -362,12 +362,15 @@ const beginCreateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "body", mapper: { - ...Mappers.Snapshot, - required: true + required: true, + serializedName: "body", + type: { + name: "Object" + } } }, responses: { - 201: { + 200: { bodyMapper: Mappers.Snapshot }, 202: {}, diff --git a/sdk/netapp/arm-netapp/src/operations/volumes.ts b/sdk/netapp/arm-netapp/src/operations/volumes.ts index c763914b6521..2ed8b37d4db5 100644 --- a/sdk/netapp/arm-netapp/src/operations/volumes.ts +++ b/sdk/netapp/arm-netapp/src/operations/volumes.ts @@ -132,38 +132,9 @@ export class Volumes { * @param [options] The optional parameters * @returns Promise */ - update(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param body Volume object supplied in the body of the operation. - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param callback The callback - */ - update(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; - /** - * @param body Volume object supplied in the body of the operation. - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback - */ - update(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - body, - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - updateOperationSpec, - callback) as Promise; + update(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,accountName,poolName,volumeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -182,8 +153,8 @@ export class Volumes { } /** - * Break the replication connection on the destination volume - * @summary Break volume replication + * Revert a volume to the snapshot specified in the body + * @summary Revert a volume to one of its snapshots * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool @@ -191,35 +162,24 @@ export class Volumes { * @param [options] The optional parameters * @returns Promise */ - breakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param callback The callback - */ - breakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + revert(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesRevertOptionalParams): Promise { + return this.beginRevert(resourceGroupName,accountName,poolName,volumeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** + * Break the replication connection on the destination volume + * @summary Break volume replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - breakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - breakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - options - }, - breakReplicationOperationSpec, - callback); + breakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginBreakReplication(resourceGroupName,accountName,poolName,volumeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -274,68 +234,104 @@ export class Volumes { * @param [options] The optional parameters * @returns Promise */ - resyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; + resyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginResyncReplication(resourceGroupName,accountName,poolName,volumeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** + * Delete the replication connection on the destination volume, and send release to the source + * replication + * @summary Delete volume replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - resyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + deleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteReplication(resourceGroupName,accountName,poolName,volumeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** + * Authorize the replication connection on the source volume + * @summary Authorize source volume replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - resyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - resyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + authorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesAuthorizeReplicationOptionalParams): Promise { + return this.beginAuthorizeReplication(resourceGroupName,accountName,poolName,volumeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update the specified volume within the capacity pool + * @summary Create or Update a volume + * @param body Volume object supplied in the body of the operation. + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(body: Models.Volume, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { + body, resourceGroupName, accountName, poolName, volumeName, options }, - resyncReplicationOperationSpec, - callback); + beginCreateOrUpdateOperationSpec, + options); } /** - * Delete the replication connection on the destination volume, and send release to the source - * replication - * @summary Delete volume replication + * Patch the specified volume + * @summary Update a volume + * @param body Volume object supplied in the body of the operation. * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param [options] The optional parameters - * @returns Promise - */ - deleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param accountName The name of the NetApp account - * @param poolName The name of the capacity pool - * @param volumeName The name of the volume - * @param callback The callback + * @returns Promise */ - deleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + beginUpdate(body: Models.VolumePatch, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + accountName, + poolName, + volumeName, + options + }, + beginUpdateOperationSpec, + options); + } + /** + * Delete the specified volume + * @summary Delete a volume * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - deleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginDeleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, accountName, @@ -343,40 +339,69 @@ export class Volumes { volumeName, options }, - deleteReplicationOperationSpec, - callback); + beginDeleteMethodOperationSpec, + options); } /** - * Authorize the replication connection on the source volume - * @summary Authorize source volume replication + * Revert a volume to the snapshot specified in the body + * @summary Revert a volume to one of its snapshots * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - authorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesAuthorizeReplicationOptionalParams): Promise; + beginRevert(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesBeginRevertOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + poolName, + volumeName, + options + }, + beginRevertOperationSpec, + options); + } + /** + * Break the replication connection on the destination volume + * @summary Break volume replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - authorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + beginBreakReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + poolName, + volumeName, + options + }, + beginBreakReplicationOperationSpec, + options); + } + /** + * 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 source to destination. + * @summary Resync volume replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - authorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: Models.VolumesAuthorizeReplicationOptionalParams, callback: msRest.ServiceCallback): void; - authorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesAuthorizeReplicationOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginResyncReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, accountName, @@ -384,14 +409,14 @@ export class Volumes { volumeName, options }, - authorizeReplicationOperationSpec, - callback); + beginResyncReplicationOperationSpec, + options); } /** - * Create or update the specified volume within the capacity pool - * @summary Create or Update a volume - * @param body Volume object supplied in the body of the operation. + * Delete the replication connection on the destination volume, and send release to the source + * replication + * @summary Delete volume replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool @@ -399,23 +424,22 @@ export class Volumes { * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(body: Models.Volume, resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + beginDeleteReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { - body, resourceGroupName, accountName, poolName, volumeName, options }, - beginCreateOrUpdateOperationSpec, + beginDeleteReplicationOperationSpec, options); } /** - * Delete the specified volume - * @summary Delete a volume + * Authorize the replication connection on the source volume + * @summary Authorize source volume replication * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool @@ -423,7 +447,7 @@ export class Volumes { * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise { + beginAuthorizeReplication(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: Models.VolumesBeginAuthorizeReplicationOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -432,7 +456,7 @@ export class Volumes { volumeName, options }, - beginDeleteMethodOperationSpec, + beginAuthorizeReplicationOperationSpec, options); } } @@ -492,8 +516,35 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const replicationStatusMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ReplicationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", urlParameters: [ Parameters.subscriptionId, @@ -511,7 +562,7 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "body", mapper: { - ...Mappers.VolumePatch, + ...Mappers.Volume, required: true } }, @@ -519,6 +570,9 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Volume }, + 201: { + bodyMapper: Mappers.Volume + }, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -527,9 +581,9 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const breakReplicationOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -543,7 +597,17 @@ const breakReplicationOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.VolumePatch, + required: true + } + }, responses: { + 200: { + bodyMapper: Mappers.Volume + }, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -552,9 +616,9 @@ const breakReplicationOperationSpec: msRest.OperationSpec = { serializer }; -const replicationStatusMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -569,9 +633,8 @@ const replicationStatusMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.ReplicationStatus - }, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -579,9 +642,9 @@ const replicationStatusMethodOperationSpec: msRest.OperationSpec = { serializer }; -const resyncReplicationOperationSpec: msRest.OperationSpec = { +const beginRevertOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -595,7 +658,20 @@ const resyncReplicationOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: { + snapshotId: [ + "options", + "snapshotId" + ] + }, + mapper: { + ...Mappers.VolumeRevert, + required: true + } + }, responses: { + 200: {}, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -604,9 +680,9 @@ const resyncReplicationOperationSpec: msRest.OperationSpec = { serializer }; -const deleteReplicationOperationSpec: msRest.OperationSpec = { +const beginBreakReplicationOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -621,6 +697,7 @@ const deleteReplicationOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -629,9 +706,9 @@ const deleteReplicationOperationSpec: msRest.OperationSpec = { serializer }; -const authorizeReplicationOperationSpec: msRest.OperationSpec = { +const beginResyncReplicationOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -645,19 +722,8 @@ const authorizeReplicationOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: { - remoteVolumeResourceId: [ - "options", - "remoteVolumeResourceId" - ] - }, - mapper: { - ...Mappers.AuthorizeRequest, - required: true - } - }, responses: { + 200: {}, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -666,9 +732,9 @@ const authorizeReplicationOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", +const beginDeleteReplicationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -682,20 +748,8 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.Volume, - required: true - } - }, responses: { - 200: { - bodyMapper: Mappers.Volume - }, - 201: { - bodyMapper: Mappers.Volume - }, + 200: {}, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -704,9 +758,9 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", +const beginAuthorizeReplicationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -720,9 +774,21 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: { + remoteVolumeResourceId: [ + "options", + "remoteVolumeResourceId" + ] + }, + mapper: { + ...Mappers.AuthorizeRequest, + required: true + } + }, responses: { + 200: {}, 202: {}, - 204: {}, default: { bodyMapper: Mappers.CloudError }