diff --git a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts index 142635725ac4..8e78c3061f8e 100644 --- a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts +++ b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts @@ -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-11-01'; + this.apiVersion = '2020-02-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 587c55d2eedb..166b245eda8f 100644 --- a/sdk/netapp/arm-netapp/src/models/accountsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/accountsMappers.ts @@ -23,5 +23,6 @@ export { VolumePatch, VolumePatchPropertiesExportPolicy, VolumePropertiesDataProtection, - VolumePropertiesExportPolicy + VolumePropertiesExportPolicy, + VolumeSnapshotProperties } from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/index.ts b/sdk/netapp/arm-netapp/src/models/index.ts index 4dff80d9ae66..800a72d540e3 100644 --- a/sdk/netapp/arm-netapp/src/models/index.ts +++ b/sdk/netapp/arm-netapp/src/models/index.ts @@ -207,6 +207,11 @@ export interface ActiveDirectory { * The Active Directory site the service will limit Domain Controller discovery to */ site?: string; + /** + * Users to be added to the Built-in Backup Operator active directory group. A list of unique + * usernames without domain specifier + */ + backupOperators?: string[]; } /** @@ -394,11 +399,11 @@ export interface ExportPolicyRule { */ cifs?: boolean; /** - * Allows NFSv3 protocol + * Allows NFSv3 protocol. Enable only for NFSv3 type volumes */ nfsv3?: boolean; /** - * Allows NFSv4.1 protocol + * Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes */ nfsv41?: boolean; /** @@ -490,6 +495,16 @@ export interface ReplicationObject { remoteVolumeRegion?: string; } +/** + * Volume Snapshot Properties + */ +export interface VolumeSnapshotProperties { + /** + * Snapshot Policy ResourceId + */ + snapshotPolicyId?: string; +} + /** * DataProtection type volumes include an object containing details of the replication * @summary DataProtection @@ -499,6 +514,10 @@ export interface VolumePropertiesDataProtection { * Replication. Replication properties */ replication?: ReplicationObject; + /** + * Snapshot. Snapshot properties. + */ + snapshot?: VolumeSnapshotProperties; } /** @@ -593,6 +612,11 @@ export interface Volume extends BaseResource { * Restoring */ isRestoring?: boolean; + /** + * If enabled (true) the volume will contain a read-only .snapshot directory which provides + * access to each of the volume's snapshots (default to true). + */ + snapshotDirectoryVisible?: boolean; } /** @@ -771,10 +795,6 @@ export interface Snapshot extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly snapshotId?: string; - /** - * fileSystemId. UUID v4 used to identify the FileSystem - */ - fileSystemId?: string; /** * name. The creation date of the snapshot * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -847,26 +867,6 @@ export interface VolumesBeginAuthorizeReplicationOptionalParams extends msRest.R 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; -} - /** * An interface representing AzureNetAppFilesManagementClientOptions. */ @@ -1134,6 +1134,26 @@ export type AccountsBeginCreateOrUpdateResponse = NetAppAccount & { }; }; +/** + * Contains response data for the beginUpdate operation. + */ +export type AccountsBeginUpdateResponse = NetAppAccount & { + /** + * 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: NetAppAccount; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/netapp/arm-netapp/src/models/mappers.ts b/sdk/netapp/arm-netapp/src/models/mappers.ts index 34bd742b40db..05077ee421b7 100644 --- a/sdk/netapp/arm-netapp/src/models/mappers.ts +++ b/sdk/netapp/arm-netapp/src/models/mappers.ts @@ -314,6 +314,17 @@ export const ActiveDirectory: msRest.CompositeMapper = { type: { name: "String" } + }, + backupOperators: { + serializedName: "backupOperators", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -800,6 +811,22 @@ export const ReplicationObject: msRest.CompositeMapper = { } }; +export const VolumeSnapshotProperties: msRest.CompositeMapper = { + serializedName: "volumeSnapshotProperties", + type: { + name: "Composite", + className: "VolumeSnapshotProperties", + modelProperties: { + snapshotPolicyId: { + serializedName: "snapshotPolicyId", + type: { + name: "String" + } + } + } + } +}; + export const VolumePropertiesDataProtection: msRest.CompositeMapper = { serializedName: "volumeProperties_dataProtection", type: { @@ -812,6 +839,13 @@ export const VolumePropertiesDataProtection: msRest.CompositeMapper = { name: "Composite", className: "ReplicationObject" } + }, + snapshot: { + serializedName: "snapshot", + type: { + name: "Composite", + className: "VolumeSnapshotProperties" + } } } } @@ -990,6 +1024,12 @@ export const Volume: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + snapshotDirectoryVisible: { + serializedName: "properties.snapshotDirectoryVisible", + type: { + name: "Boolean" + } } } } @@ -1292,17 +1332,6 @@ export const Snapshot: msRest.CompositeMapper = { name: "String" } }, - fileSystemId: { - 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" - } - }, created: { readOnly: true, serializedName: "properties.created", diff --git a/sdk/netapp/arm-netapp/src/models/parameters.ts b/sdk/netapp/arm-netapp/src/models/parameters.ts index a8abb6c6f048..207058680667 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-11-01', + defaultValue: '2020-02-01', type: { name: "String" } diff --git a/sdk/netapp/arm-netapp/src/models/poolsMappers.ts b/sdk/netapp/arm-netapp/src/models/poolsMappers.ts index e50bdf260d22..f82680a824b8 100644 --- a/sdk/netapp/arm-netapp/src/models/poolsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/poolsMappers.ts @@ -23,5 +23,6 @@ export { VolumePatch, VolumePatchPropertiesExportPolicy, VolumePropertiesDataProtection, - VolumePropertiesExportPolicy + VolumePropertiesExportPolicy, + VolumeSnapshotProperties } from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts b/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts index db83bb018f12..9d43e596db18 100644 --- a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts @@ -23,5 +23,6 @@ export { VolumePatch, VolumePatchPropertiesExportPolicy, VolumePropertiesDataProtection, - VolumePropertiesExportPolicy + VolumePropertiesExportPolicy, + VolumeSnapshotProperties } from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts b/sdk/netapp/arm-netapp/src/models/volumesMappers.ts index e3ca24d90b89..a5075cf0069b 100644 --- a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/volumesMappers.ts @@ -26,5 +26,6 @@ export { VolumePatchPropertiesExportPolicy, VolumePropertiesDataProtection, VolumePropertiesExportPolicy, - VolumeRevert + VolumeRevert, + VolumeSnapshotProperties } from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/operations/accounts.ts b/sdk/netapp/arm-netapp/src/operations/accounts.ts index 3585996a77b9..6b67e8bff37d 100644 --- a/sdk/netapp/arm-netapp/src/operations/accounts.ts +++ b/sdk/netapp/arm-netapp/src/operations/accounts.ts @@ -125,71 +125,69 @@ export class Accounts { * @param [options] The optional parameters * @returns Promise */ - update(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param body NetApp Account 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 callback The callback - */ - update(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + update(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,accountName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** + * Create or update the specified NetApp account within the resource group + * @summary Create or update a NetApp account * @param body NetApp Account 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 options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - update(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginCreateOrUpdate(body: Models.NetAppAccount, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { body, resourceGroupName, accountName, options }, - updateOperationSpec, - callback) as Promise; + beginCreateOrUpdateOperationSpec, + options); } /** - * Create or update the specified NetApp account within the resource group - * @summary Create or update a NetApp account - * @param body NetApp Account object supplied in the body of the operation. + * Delete the specified NetApp account + * @summary Delete a NetApp account * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(body: Models.NetAppAccount, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + beginDeleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { - body, resourceGroupName, accountName, options }, - beginCreateOrUpdateOperationSpec, + beginDeleteMethodOperationSpec, options); } /** - * Delete the specified NetApp account - * @summary Delete a NetApp account + * Patch the specified NetApp account + * @summary Update a NetApp account + * @param body NetApp Account 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 [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { + beginUpdate(body: Models.NetAppAccountPatch, resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { + body, resourceGroupName, accountName, options }, - beginDeleteMethodOperationSpec, + beginUpdateOperationSpec, options); } } @@ -245,8 +243,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}", urlParameters: [ Parameters.subscriptionId, @@ -262,7 +260,7 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "body", mapper: { - ...Mappers.NetAppAccountPatch, + ...Mappers.NetAppAccount, required: true } }, @@ -270,6 +268,9 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.NetAppAccount }, + 201: { + bodyMapper: Mappers.NetAppAccount + }, 202: {}, default: { bodyMapper: Mappers.CloudError @@ -278,8 +279,8 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", urlParameters: [ Parameters.subscriptionId, @@ -292,21 +293,9 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.NetAppAccount, - required: true - } - }, responses: { - 200: { - bodyMapper: Mappers.NetAppAccount - }, - 201: { - bodyMapper: Mappers.NetAppAccount - }, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -314,8 +303,8 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}", urlParameters: [ Parameters.subscriptionId, @@ -328,9 +317,21 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.NetAppAccountPatch, + required: true + } + }, responses: { + 200: { + bodyMapper: Mappers.NetAppAccount + }, + 201: { + bodyMapper: Mappers.NetAppAccount + }, 202: {}, - 204: {}, 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 5875523b8c3e..829e505751bc 100644 --- a/sdk/netapp/arm-netapp/src/operations/snapshots.ts +++ b/sdk/netapp/arm-netapp/src/operations/snapshots.ts @@ -125,7 +125,7 @@ export class Snapshots { * @param [options] The optional parameters * @returns Promise */ - create(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: Models.SnapshotsCreateOptionalParams): Promise { + create(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: msRest.RequestOptionsBase): Promise { return this.beginCreate(resourceGroupName,accountName,poolName,volumeName,snapshotName,location,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } @@ -175,7 +175,7 @@ export class Snapshots { * @param [options] The optional parameters * @returns Promise */ - beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: Models.SnapshotsBeginCreateOptionalParams): Promise { + beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, location: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -319,11 +319,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { ], requestBody: { parameterPath: { - location: "location", - fileSystemId: [ - "options", - "fileSystemId" - ] + location: "location" }, mapper: { ...Mappers.Snapshot,