From 1159cce600ab89453443614c08eed9babb797e9f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 22 Feb 2021 14:29:29 +0000 Subject: [PATCH] CodeGen from PR 13094 in Azure/azure-rest-api-specs Merge c4dae091567a1b75f37ff081cb4036b9438a099f into 46748d2684b430f1286fda139eaedbbbcc73e924 --- sdk/netapp/arm-netapp/LICENSE.txt | 2 +- ...azureNetAppFilesManagementClientContext.ts | 8 +- .../src/models/accountBackupsMappers.ts | 2 + .../arm-netapp/src/models/accountsMappers.ts | 2 + .../src/models/backupPoliciesMappers.ts | 2 + .../arm-netapp/src/models/backupsMappers.ts | 2 + sdk/netapp/arm-netapp/src/models/index.ts | 209 +++++++++++++++++- sdk/netapp/arm-netapp/src/models/mappers.ts | 131 ++++++++++- .../arm-netapp/src/models/parameters.ts | 2 +- .../arm-netapp/src/models/poolsMappers.ts | 2 + .../src/models/snapshotPoliciesMappers.ts | 2 + .../arm-netapp/src/models/snapshotsMappers.ts | 2 + .../arm-netapp/src/models/vaultsMappers.ts | 2 + .../arm-netapp/src/models/volumesMappers.ts | 2 + .../arm-netapp/src/operations/accounts.ts | 57 ++++- .../src/operations/backupPolicies.ts | 3 + .../arm-netapp/src/operations/backups.ts | 95 ++++---- sdk/netapp/arm-netapp/src/operations/pools.ts | 54 ++++- .../src/operations/snapshotPolicies.ts | 87 ++++---- 19 files changed, 556 insertions(+), 110 deletions(-) diff --git a/sdk/netapp/arm-netapp/LICENSE.txt b/sdk/netapp/arm-netapp/LICENSE.txt index ea8fb1516028..2d3163745319 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) 2020 Microsoft +Copyright (c) 2021 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/src/azureNetAppFilesManagementClientContext.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts index 8ab7ac75088c..2415ef61bd9f 100644 --- a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts +++ b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts @@ -37,14 +37,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 = '2020-09-01'; + this.apiVersion = '2020-11-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -52,10 +52,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/accountBackupsMappers.ts b/sdk/netapp/arm-netapp/src/models/accountBackupsMappers.ts index e749b6ea3588..de742c81ab8d 100644 --- a/sdk/netapp/arm-netapp/src/models/accountBackupsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/accountBackupsMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -28,6 +29,7 @@ export { ReplicationObject, Snapshot, SnapshotPolicy, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/models/accountsMappers.ts b/sdk/netapp/arm-netapp/src/models/accountsMappers.ts index 1deca022b1f2..ecf21f05abbf 100644 --- a/sdk/netapp/arm-netapp/src/models/accountsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/accountsMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -28,6 +29,7 @@ export { ReplicationObject, Snapshot, SnapshotPolicy, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts b/sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts index b7f94c10dcf8..7d1c1a293c6e 100644 --- a/sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/backupPoliciesMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -28,6 +29,7 @@ export { ReplicationObject, Snapshot, SnapshotPolicy, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/models/backupsMappers.ts b/sdk/netapp/arm-netapp/src/models/backupsMappers.ts index e749b6ea3588..de742c81ab8d 100644 --- a/sdk/netapp/arm-netapp/src/models/backupsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/backupsMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -28,6 +29,7 @@ export { ReplicationObject, Snapshot, SnapshotPolicy, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/models/index.ts b/sdk/netapp/arm-netapp/src/models/index.ts index abcc4a890e12..dec93706f969 100644 --- a/sdk/netapp/arm-netapp/src/models/index.ts +++ b/sdk/netapp/arm-netapp/src/models/index.ts @@ -228,7 +228,8 @@ export interface ActiveDirectory { */ smbServerName?: string; /** - * The Organizational Unit (OU) within the Windows Active Directory + * The Organizational Unit (OU) within the Windows Active Directory. Default value: + * 'CN=Computers'. */ organizationalUnit?: string; /** @@ -269,6 +270,53 @@ export interface ActiveDirectory { * Continuously available shares for SQL). A list of unique usernames without domain specifier */ securityOperators?: string[]; + /** + * Specifies whether or not the LDAP traffic needs to be secured via TLS. + */ + ldapOverTLS?: boolean; +} + +/** + * Encryption settings + */ +export interface AccountEncryption { + /** + * Encryption Key Source. Possible values are: 'Microsoft.NetApp'. Possible values include: + * 'Microsoft.NetApp' + */ + keySource?: KeySource; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; } /** @@ -307,6 +355,15 @@ export interface NetAppAccount extends BaseResource { * Active Directories */ activeDirectories?: ActiveDirectory[]; + /** + * Encryption settings + */ + encryption?: AccountEncryption; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -345,6 +402,10 @@ export interface NetAppAccountPatch extends BaseResource { * Active Directories */ activeDirectories?: ActiveDirectory[]; + /** + * Encryption settings + */ + encryption?: AccountEncryption; } /** @@ -685,7 +746,7 @@ export interface Volume extends BaseResource { */ exportPolicy?: VolumePropertiesExportPolicy; /** - * protocolTypes. Set of protocol types + * protocolTypes. Set of protocol types, default NFSv3, CIFS fro SMB protocol */ protocolTypes?: string[]; /** @@ -713,8 +774,9 @@ export interface Volume extends BaseResource { subnetId: string; /** * mountTargets. List of mount targets + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - mountTargets?: MountTargetProperties[]; + readonly mountTargets?: MountTargetProperties[]; /** * What type of volume is this */ @@ -729,8 +791,8 @@ export interface Volume extends BaseResource { */ 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). + * 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). Default value: true. */ snapshotDirectoryVisible?: boolean; /** @@ -739,7 +801,8 @@ export interface Volume extends BaseResource { */ kerberosEnabled?: boolean; /** - * The security style of volume. Possible values include: 'ntfs', 'unix' + * The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS + * protocol. Possible values include: 'ntfs', 'unix'. Default value: 'unix'. */ securityStyle?: SecurityStyle; /** @@ -753,9 +816,13 @@ export interface Volume extends BaseResource { */ smbContinuouslyAvailable?: boolean; /** - * Maximum throughput in Mibps that can be achieved by this volume. + * Maximum throughput in Mibps that can be achieved by this volume. Default value: 0. */ throughputMibps?: number; + /** + * Encryption Key Source. Possible values are: 'Microsoft.NetApp' + */ + encryptionKeySource?: string; } /** @@ -1319,6 +1386,11 @@ export interface Backup extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly backupType?: string; + /** + * Failure reason + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly failureReason?: string; } /** @@ -1358,6 +1430,11 @@ export interface BackupPatch extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly backupType?: string; + /** + * Failure reason + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly failureReason?: string; } /** @@ -1704,6 +1781,20 @@ export interface BackupsBeginCreateOptionalParams extends msRest.RequestOptionsB label?: string; } +/** + * Optional Parameters. + */ +export interface BackupsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * Label for backup + */ + label?: string; +} + /** * An interface representing AzureNetAppFilesManagementClientOptions. */ @@ -1726,6 +1817,10 @@ export interface OperationListResult extends Array { * @extends Array */ export interface NetAppAccountList extends Array { + /** + * URL to get the next set of results. + */ + nextLink?: string; } /** @@ -1734,6 +1829,10 @@ export interface NetAppAccountList extends Array { * @extends Array */ export interface CapacityPoolList extends Array { + /** + * URL to get the next set of results. + */ + nextLink?: string; } /** @@ -1826,6 +1925,22 @@ export type CheckQuotaNameResourceTypes = 'Microsoft.NetApp/netAppAccounts' | 'M */ export type ActiveDirectoryStatus = 'Created' | 'InUse' | 'Deleted' | 'Error' | 'Updating'; +/** + * Defines values for KeySource. + * Possible values include: 'Microsoft.NetApp' + * @readonly + * @enum {string} + */ +export type KeySource = 'Microsoft.NetApp'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + /** * Defines values for ServiceLevel. * Possible values include: 'Standard', 'Premium', 'Ultra' @@ -2082,6 +2197,26 @@ export type AccountsBeginUpdateResponse = NetAppAccount & { }; }; +/** + * Contains response data for the listNext operation. + */ +export type AccountsListNextResponse = NetAppAccountList & { + /** + * 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: NetAppAccountList; + }; +}; + /** * Contains response data for the list operation. */ @@ -2202,6 +2337,26 @@ export type PoolsBeginUpdateResponse = CapacityPool & { }; }; +/** + * Contains response data for the listNext operation. + */ +export type PoolsListNextResponse = CapacityPoolList & { + /** + * 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: CapacityPoolList; + }; +}; + /** * Contains response data for the list operation. */ @@ -2582,6 +2737,26 @@ export type SnapshotPoliciesListVolumesResponse = SnapshotPolicyVolumeList & { }; }; +/** + * Contains response data for the beginUpdate operation. + */ +export type SnapshotPoliciesBeginUpdateResponse = SnapshotPolicy & { + /** + * 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: SnapshotPolicy; + }; +}; + /** * Contains response data for the list operation. */ @@ -2722,6 +2897,26 @@ export type BackupsBeginCreateResponse = Backup & { }; }; +/** + * Contains response data for the beginUpdate operation. + */ +export type BackupsBeginUpdateResponse = Backup & { + /** + * 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: Backup; + }; +}; + /** * 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 cb0934f86c4a..6a45231581ce 100644 --- a/sdk/netapp/arm-netapp/src/models/mappers.ts +++ b/sdk/netapp/arm-netapp/src/models/mappers.ts @@ -293,6 +293,7 @@ export const ActiveDirectory: msRest.CompositeMapper = { className: "ActiveDirectory", modelProperties: { activeDirectoryId: { + nullable: true, serializedName: "activeDirectoryId", type: { name: "String" @@ -347,6 +348,7 @@ export const ActiveDirectory: msRest.CompositeMapper = { }, organizationalUnit: { serializedName: "organizationalUnit", + defaultValue: 'CN=Computers', type: { name: "String" } @@ -419,6 +421,74 @@ export const ActiveDirectory: msRest.CompositeMapper = { } } } + }, + ldapOverTLS: { + serializedName: "ldapOverTLS", + type: { + name: "Boolean" + } + } + } + } +}; + +export const AccountEncryption: msRest.CompositeMapper = { + serializedName: "accountEncryption", + type: { + name: "Composite", + className: "AccountEncryption", + modelProperties: { + keySource: { + serializedName: "keySource", + type: { + name: "String" + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -487,6 +557,21 @@ export const NetAppAccount: msRest.CompositeMapper = { } } } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "AccountEncryption" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -554,6 +639,13 @@ export const NetAppAccountPatch: msRest.CompositeMapper = { } } } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "AccountEncryption" + } } } } @@ -1140,6 +1232,7 @@ export const Volume: msRest.CompositeMapper = { } }, snapshotId: { + nullable: true, serializedName: "properties.snapshotId", constraints: { MaxLength: 36, @@ -1176,6 +1269,7 @@ export const Volume: msRest.CompositeMapper = { } }, mountTargets: { + readOnly: true, serializedName: "properties.mountTargets", type: { name: "Sequence", @@ -1208,6 +1302,7 @@ export const Volume: msRest.CompositeMapper = { }, snapshotDirectoryVisible: { serializedName: "properties.snapshotDirectoryVisible", + defaultValue: true, type: { name: "Boolean" } @@ -1221,6 +1316,7 @@ export const Volume: msRest.CompositeMapper = { }, securityStyle: { serializedName: "properties.securityStyle", + defaultValue: 'unix', type: { name: "String" } @@ -1241,14 +1337,21 @@ export const Volume: msRest.CompositeMapper = { }, throughputMibps: { serializedName: "properties.throughputMibps", + defaultValue: 0, constraints: { InclusiveMaximum: 4500, - InclusiveMinimum: 1, + InclusiveMinimum: 0, MultipleOf: 0.001 }, type: { name: "Number" } + }, + encryptionKeySource: { + serializedName: "properties.encryptionKeySource", + type: { + name: "String" + } } } } @@ -2170,6 +2273,13 @@ export const Backup: msRest.CompositeMapper = { type: { name: "String" } + }, + failureReason: { + readOnly: true, + serializedName: "properties.failureReason", + type: { + name: "String" + } } } } @@ -2237,6 +2347,13 @@ export const BackupPatch: msRest.CompositeMapper = { type: { name: "String" } + }, + failureReason: { + readOnly: true, + serializedName: "properties.failureReason", + type: { + name: "String" + } } } } @@ -2684,6 +2801,12 @@ export const NetAppAccountList: msRest.CompositeMapper = { } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } @@ -2706,6 +2829,12 @@ export const CapacityPoolList: msRest.CompositeMapper = { } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } diff --git a/sdk/netapp/arm-netapp/src/models/parameters.ts b/sdk/netapp/arm-netapp/src/models/parameters.ts index 790b5dfffa36..276f0e652ef4 100644 --- a/sdk/netapp/arm-netapp/src/models/parameters.ts +++ b/sdk/netapp/arm-netapp/src/models/parameters.ts @@ -34,7 +34,7 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", - defaultValue: '2020-09-01', + defaultValue: '2020-11-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 1b3dac3c95a4..4cdb59961bbe 100644 --- a/sdk/netapp/arm-netapp/src/models/poolsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/poolsMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -28,6 +29,7 @@ export { ReplicationObject, Snapshot, SnapshotPolicy, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts b/sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts index 679cafce3b38..7fb7e27a0438 100644 --- a/sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/snapshotPoliciesMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -30,6 +31,7 @@ export { SnapshotPolicy, SnapshotPolicyPatch, SnapshotPolicyVolumeList, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts b/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts index 324d59736eac..b4063584ddd8 100644 --- a/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/snapshotsMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -28,6 +29,7 @@ export { Snapshot, SnapshotPolicy, SnapshotsList, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/models/vaultsMappers.ts b/sdk/netapp/arm-netapp/src/models/vaultsMappers.ts index f0387390e7d4..f9615cb07883 100644 --- a/sdk/netapp/arm-netapp/src/models/vaultsMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/vaultsMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, Backup, BackupPatch, @@ -27,6 +28,7 @@ export { ReplicationObject, Snapshot, SnapshotPolicy, + SystemData, Vault, VaultList, Volume, diff --git a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts b/sdk/netapp/arm-netapp/src/models/volumesMappers.ts index df8c03e2beb1..2ec246d0704a 100644 --- a/sdk/netapp/arm-netapp/src/models/volumesMappers.ts +++ b/sdk/netapp/arm-netapp/src/models/volumesMappers.ts @@ -7,6 +7,7 @@ */ export { + AccountEncryption, ActiveDirectory, AuthorizeRequest, Backup, @@ -31,6 +32,7 @@ export { ReplicationStatus, Snapshot, SnapshotPolicy, + SystemData, Vault, Volume, VolumeBackupProperties, diff --git a/sdk/netapp/arm-netapp/src/operations/accounts.ts b/sdk/netapp/arm-netapp/src/operations/accounts.ts index b9e2260b1a59..22be6b79a9ce 100644 --- a/sdk/netapp/arm-netapp/src/operations/accounts.ts +++ b/sdk/netapp/arm-netapp/src/operations/accounts.ts @@ -189,6 +189,35 @@ export class Accounts { beginUpdateOperationSpec, options); } + + /** + * List and describe all NetApp accounts in the resource group. + * @summary Describe all NetApp Accounts in a resource group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -270,7 +299,6 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.NetAppAccount }, - 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -327,10 +355,33 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.NetAppAccount }, - 201: { + 202: { bodyMapper: Mappers.NetAppAccount }, - 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.NetAppAccountList + }, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts b/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts index 60e9383342a7..0b42264bc940 100644 --- a/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts +++ b/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts @@ -290,6 +290,9 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.BackupPolicy }, + 202: { + bodyMapper: Mappers.BackupPolicy + }, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/netapp/arm-netapp/src/operations/backups.ts b/sdk/netapp/arm-netapp/src/operations/backups.ts index 43dbe99e23cd..2e59fa436062 100644 --- a/sdk/netapp/arm-netapp/src/operations/backups.ts +++ b/sdk/netapp/arm-netapp/src/operations/backups.ts @@ -140,38 +140,9 @@ export class Backups { * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: Models.BackupsUpdateOptionalParams): 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 backupName The name of the backup - * @param callback The callback - */ - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: 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 backupName The name of the backup - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options: Models.BackupsUpdateOptionalParams, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: Models.BackupsUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - poolName, - volumeName, - backupName, - options - }, - updateOperationSpec, - callback) as Promise; + update(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: Models.BackupsUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,accountName,poolName,volumeName,backupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -217,6 +188,31 @@ export class Backups { options); } + /** + * Patch a backup for the volume + * @summary Patch a backup + * @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 backupName The name of the backup + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, backupName: string, options?: Models.BackupsBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + poolName, + volumeName, + backupName, + options + }, + beginUpdateOperationSpec, + options); + } + /** * Delete a backup of the volume * @summary Delete backup @@ -300,8 +296,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}/backups/{backupName}", urlParameters: [ Parameters.subscriptionId, @@ -319,21 +315,25 @@ const updateOperationSpec: msRest.OperationSpec = { ], requestBody: { parameterPath: { - tags: [ - "options", - "tags" - ], + location: "location", label: [ "options", "label" ] }, - mapper: Mappers.BackupPatch + mapper: { + ...Mappers.Backup, + required: true + } }, responses: { 200: { bodyMapper: Mappers.Backup }, + 201: { + bodyMapper: Mappers.Backup + }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -341,8 +341,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}/backups/{backupName}", urlParameters: [ Parameters.subscriptionId, @@ -360,25 +360,24 @@ const beginCreateOperationSpec: msRest.OperationSpec = { ], requestBody: { parameterPath: { - location: "location", + tags: [ + "options", + "tags" + ], label: [ "options", "label" ] }, - mapper: { - ...Mappers.Backup, - required: true - } + mapper: Mappers.BackupPatch }, responses: { 200: { bodyMapper: Mappers.Backup }, - 201: { + 202: { bodyMapper: Mappers.Backup }, - 202: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/netapp/arm-netapp/src/operations/pools.ts b/sdk/netapp/arm-netapp/src/operations/pools.ts index 4f55c77fc733..54a1fac737a9 100644 --- a/sdk/netapp/arm-netapp/src/operations/pools.ts +++ b/sdk/netapp/arm-netapp/src/operations/pools.ts @@ -206,6 +206,35 @@ export class Pools { beginDeleteMethodOperationSpec, options); } + + /** + * List all capacity pools in the NetApp Account + * @summary Describe all Capacity Pools + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -290,7 +319,6 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.CapacityPool }, - 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -356,3 +384,27 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CapacityPoolList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts b/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts index 64861672751f..1e5b9c72c5f8 100644 --- a/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts +++ b/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts @@ -143,35 +143,9 @@ export class SnapshotPolicies { * @param [options] The optional parameters * @returns Promise */ - update(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param body Snapshot policy 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 snapshotPolicyName The name of the snapshot policy target - * @param callback The callback - */ - update(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, callback: msRest.ServiceCallback): void; - /** - * @param body Snapshot policy 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 snapshotPolicyName The name of the snapshot policy target - * @param options The optional parameters - * @param callback The callback - */ - update(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - body, - resourceGroupName, - accountName, - snapshotPolicyName, - options - }, - updateOperationSpec, - callback) as Promise; + update(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(body,resourceGroupName,accountName,snapshotPolicyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -224,6 +198,28 @@ export class SnapshotPolicies { callback) as Promise; } + /** + * Patch a snapshot policy + * @param body Snapshot policy 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 snapshotPolicyName The name of the snapshot policy target + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(body: Models.SnapshotPolicyPatch, resourceGroupName: string, accountName: string, snapshotPolicyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + body, + resourceGroupName, + accountName, + snapshotPolicyName, + options + }, + beginUpdateOperationSpec, + options); + } + /** * Delete snapshot policy * @param resourceGroupName The name of the resource group. @@ -334,9 +330,9 @@ const createOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", +const listVolumesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -349,16 +345,9 @@ const updateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "body", - mapper: { - ...Mappers.SnapshotPolicyPatch, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.SnapshotPolicy + bodyMapper: Mappers.SnapshotPolicyVolumeList }, default: { bodyMapper: Mappers.CloudError @@ -367,9 +356,9 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const listVolumesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/listVolumes", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -382,9 +371,19 @@ const listVolumesOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.SnapshotPolicyPatch, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.SnapshotPolicyVolumeList + bodyMapper: Mappers.SnapshotPolicy + }, + 202: { + bodyMapper: Mappers.SnapshotPolicy }, default: { bodyMapper: Mappers.CloudError