diff --git a/sdk/netapp/arm-netapp/CHANGELOG.md b/sdk/netapp/arm-netapp/CHANGELOG.md index 30281727f442..9e36df8e1e7c 100644 --- a/sdk/netapp/arm-netapp/CHANGELOG.md +++ b/sdk/netapp/arm-netapp/CHANGELOG.md @@ -1,5 +1,48 @@ # Release History +## 15.1.0 (2022-02-09) + +**Features** + + - Added operation group Subvolumes + - Added operation Snapshots.beginRestoreFiles + - Added operation Snapshots.beginRestoreFilesAndWait + - Added Interface LdapSearchScopeOpt + - Added Interface SnapshotRestoreFiles + - Added Interface SnapshotsRestoreFilesOptionalParams + - Added Interface SubvolumeModel + - Added Interface SubvolumePatchRequest + - Added Interface SubvolumesCreateOptionalParams + - Added Interface SubvolumesDeleteOptionalParams + - Added Interface SubvolumesGetMetadataOptionalParams + - Added Interface SubvolumesGetOptionalParams + - Added Interface SubvolumesList + - Added Interface SubvolumesListByVolumeNextOptionalParams + - Added Interface SubvolumesListByVolumeOptionalParams + - Added Interface SubvolumesUpdateOptionalParams + - Added Type Alias EnableSubvolumes + - Added Type Alias SubvolumeInfo + - Added Type Alias SubvolumesCreateResponse + - Added Type Alias SubvolumesGetMetadataResponse + - Added Type Alias SubvolumesGetResponse + - Added Type Alias SubvolumesListByVolumeNextResponse + - Added Type Alias SubvolumesListByVolumeResponse + - Added Type Alias SubvolumesUpdateResponse + - Interface ActiveDirectory has a new optional parameter ldapSearchScope + - Interface BackupPolicy has a new optional parameter systemData + - Interface CapacityPool has a new optional parameter systemData + - Interface SnapshotPolicy has a new optional parameter systemData + - Interface Volume has a new optional parameter enableSubvolumes + - Interface Volume has a new optional parameter maximumNumberOfFiles + - Interface Volume has a new optional parameter systemData + - Interface VolumeGroupVolumeProperties has a new optional parameter enableSubvolumes + - Interface VolumeGroupVolumeProperties has a new optional parameter maximumNumberOfFiles + - Interface VolumePatch has a new optional parameter unixPermissions + - Interface VolumesDeleteOptionalParams has a new optional parameter forceDelete + - Class NetAppManagementClient has a new parameter subvolumes + - Added Enum KnownEnableSubvolumes + + ## 15.0.0 (2022-01-20) The package of @azure/arm-netapp is using our next generation design principles since version 15.0.0, which contains breaking changes. diff --git a/sdk/netapp/arm-netapp/_meta.json b/sdk/netapp/arm-netapp/_meta.json index c7e717a29034..d509e92a8c57 100644 --- a/sdk/netapp/arm-netapp/_meta.json +++ b/sdk/netapp/arm-netapp/_meta.json @@ -1,7 +1,7 @@ { - "commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb", + "commit": "ed4b29fbceaea3cc48f039826db5a92360bc7c56", "readme": "specification/netapp/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/netapp/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/netapp/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20220114.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/api-extractor.json b/sdk/netapp/arm-netapp/api-extractor.json index 0f53b33ec840..c14c2d9f00dd 100644 --- a/sdk/netapp/arm-netapp/api-extractor.json +++ b/sdk/netapp/arm-netapp/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-netapp.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/package.json b/sdk/netapp/arm-netapp/package.json index 67f849d48a1b..ac0d32fd75ea 100644 --- a/sdk/netapp/arm-netapp/package.json +++ b/sdk/netapp/arm-netapp/package.json @@ -3,8 +3,10 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetAppManagementClient.", - "version": "15.0.0", - "engines": { "node": ">=12.0.0" }, + "version": "15.1.0", + "engines": { + "node": ">=12.0.0" + }, "dependencies": { "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", @@ -14,7 +16,13 @@ "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, - "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", @@ -41,7 +49,9 @@ "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, "files": [ "dist/**/*.js", "dist/**/*.js.map", @@ -88,10 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { "path": "src/NetAppManagementClient.ts", "prefix": "packageDetails" } - ] - }, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/netapp/arm-netapp/review/arm-netapp.api.md b/sdk/netapp/arm-netapp/review/arm-netapp.api.md index 70cb8f73718a..c780220e6668 100644 --- a/sdk/netapp/arm-netapp/review/arm-netapp.api.md +++ b/sdk/netapp/arm-netapp/review/arm-netapp.api.md @@ -128,6 +128,7 @@ export interface ActiveDirectory { encryptDCConnections?: boolean; kdcIP?: string; ldapOverTLS?: boolean; + ldapSearchScope?: LdapSearchScopeOpt; ldapSigning?: boolean; organizationalUnit?: string; password?: string; @@ -253,6 +254,7 @@ export interface BackupPolicy { monthlyBackupsToKeep?: number; readonly name?: string; readonly provisioningState?: string; + readonly systemData?: SystemData; tags?: { [propertyName: string]: string; }; @@ -405,6 +407,7 @@ export interface CapacityPool { qosType?: QosType; serviceLevel: ServiceLevel; size: number; + readonly systemData?: SystemData; tags?: { [propertyName: string]: string; }; @@ -476,6 +479,9 @@ export interface Dimension { name?: string; } +// @public +export type EnableSubvolumes = string; + // @public export type EncryptionType = string; @@ -588,6 +594,12 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownEnableSubvolumes { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownEncryptionType { Double = "Double", @@ -679,6 +691,13 @@ export enum KnownVolumeStorageToNetworkProximity { T2 = "T2" } +// @public +export interface LdapSearchScopeOpt { + groupDN?: string; + groupMembershipFilter?: string; + userDN?: string; +} + // @public export interface LogSpecification { displayName?: string; @@ -809,6 +828,8 @@ export class NetAppManagementClient extends coreClient.ServiceClient { // (undocumented) subscriptionId: string; // (undocumented) + subvolumes: Subvolumes; + // (undocumented) vaults: Vaults; // (undocumented) volumeGroups: VolumeGroups; @@ -1137,6 +1158,7 @@ export interface SnapshotPolicy { monthlySchedule?: MonthlySchedule; readonly name?: string; readonly provisioningState?: string; + readonly systemData?: SystemData; tags?: { [propertyName: string]: string; }; @@ -1183,12 +1205,20 @@ export interface SnapshotPolicyVolumeList { value?: Volume[]; } +// @public +export interface SnapshotRestoreFiles { + destinationPath?: string; + filePaths: string[]; +} + // @public export interface Snapshots { beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise, SnapshotsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsDeleteOptionalParams): Promise; + beginRestoreFiles(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: SnapshotRestoreFiles, options?: SnapshotsRestoreFilesOptionalParams): Promise, void>>; + beginRestoreFilesAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: SnapshotRestoreFiles, options?: SnapshotsRestoreFilesOptionalParams): Promise; beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Record, options?: SnapshotsUpdateOptionalParams): Promise, SnapshotsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, body: Record, options?: SnapshotsUpdateOptionalParams): Promise; get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, snapshotName: string, options?: SnapshotsGetOptionalParams): Promise; @@ -1229,6 +1259,12 @@ export interface SnapshotsListOptionalParams extends coreClient.OperationOptions // @public export type SnapshotsListResponse = SnapshotsList; +// @public +export interface SnapshotsRestoreFilesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface SnapshotsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1250,6 +1286,112 @@ export interface SubscriptionQuotaItemList { value?: SubscriptionQuotaItem[]; } +// @public +export type SubvolumeInfo = ProxyResource & { + readonly systemData?: SystemData; + path?: string; + size?: number; + parentPath?: string; + readonly provisioningState?: string; +}; + +// @public +export interface SubvolumeModel { + accessedTimeStamp?: Date; + bytesUsed?: number; + changedTimeStamp?: Date; + creationTimeStamp?: Date; + readonly id?: string; + modifiedTimeStamp?: Date; + readonly name?: string; + parentPath?: string; + path?: string; + permissions?: string; + provisioningState?: string; + size?: number; + readonly type?: string; +} + +// @public +export interface SubvolumePatchRequest { + path?: string; + size?: number; +} + +// @public +export interface Subvolumes { + beginCreate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumeInfo, options?: SubvolumesCreateOptionalParams): Promise, SubvolumesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumeInfo, options?: SubvolumesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesDeleteOptionalParams): Promise; + beginGetMetadata(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesGetMetadataOptionalParams): Promise, SubvolumesGetMetadataResponse>>; + beginGetMetadataAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesGetMetadataOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumePatchRequest, options?: SubvolumesUpdateOptionalParams): Promise, SubvolumesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, body: SubvolumePatchRequest, options?: SubvolumesUpdateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, subvolumeName: string, options?: SubvolumesGetOptionalParams): Promise; + listByVolume(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: SubvolumesListByVolumeOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SubvolumesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SubvolumesCreateResponse = SubvolumeInfo; + +// @public +export interface SubvolumesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SubvolumesGetMetadataOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SubvolumesGetMetadataResponse = SubvolumeModel; + +// @public +export interface SubvolumesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SubvolumesGetResponse = SubvolumeInfo; + +// @public +export interface SubvolumesList { + nextLink?: string; + value?: SubvolumeInfo[]; +} + +// @public +export interface SubvolumesListByVolumeNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SubvolumesListByVolumeNextResponse = SubvolumesList; + +// @public +export interface SubvolumesListByVolumeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SubvolumesListByVolumeResponse = SubvolumesList; + +// @public +export interface SubvolumesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SubvolumesUpdateResponse = SubvolumeInfo; + // @public export interface SystemData { createdAt?: Date; @@ -1299,6 +1441,7 @@ export interface Volume { dataProtection?: VolumePropertiesDataProtection; defaultGroupQuotaInKiBs?: number; defaultUserQuotaInKiBs?: number; + enableSubvolumes?: EnableSubvolumes; encryptionKeySource?: string; readonly etag?: string; exportPolicy?: VolumePropertiesExportPolicy; @@ -1309,6 +1452,7 @@ export interface Volume { kerberosEnabled?: boolean; ldapEnabled?: boolean; location: string; + readonly maximumNumberOfFiles?: number; readonly mountTargets?: MountTargetProperties[]; readonly name?: string; networkFeatures?: NetworkFeatures; @@ -1325,6 +1469,7 @@ export interface Volume { snapshotId?: string; readonly storageToNetworkProximity?: VolumeStorageToNetworkProximity; subnetId: string; + readonly systemData?: SystemData; readonly t2Network?: string; tags?: { [propertyName: string]: string; @@ -1447,6 +1592,7 @@ export interface VolumeGroupVolumeProperties { dataProtection?: VolumePropertiesDataProtection; defaultGroupQuotaInKiBs?: number; defaultUserQuotaInKiBs?: number; + enableSubvolumes?: EnableSubvolumes; encryptionKeySource?: string; exportPolicy?: VolumePropertiesExportPolicy; readonly fileSystemId?: string; @@ -1455,6 +1601,7 @@ export interface VolumeGroupVolumeProperties { isRestoring?: boolean; kerberosEnabled?: boolean; ldapEnabled?: boolean; + readonly maximumNumberOfFiles?: number; readonly mountTargets?: MountTargetProperties[]; name?: string; networkFeatures?: NetworkFeatures; @@ -1506,6 +1653,7 @@ export interface VolumePatch { }; throughputMibps?: number; readonly type?: string; + unixPermissions?: string; usageThreshold?: number; } @@ -1588,6 +1736,7 @@ export type VolumesCreateOrUpdateResponse = Volume; // @public export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions { + forceDelete?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } diff --git a/sdk/netapp/arm-netapp/src/models/index.ts b/sdk/netapp/arm-netapp/src/models/index.ts index 7c71e6ebbceb..2d7d17e641a1 100644 --- a/sdk/netapp/arm-netapp/src/models/index.ts +++ b/sdk/netapp/arm-netapp/src/models/index.ts @@ -277,6 +277,18 @@ export interface ActiveDirectory { allowLocalNfsUsersWithLdap?: boolean; /** If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. */ encryptDCConnections?: boolean; + /** LDAP Search scope options */ + ldapSearchScope?: LdapSearchScopeOpt; +} + +/** LDAP search scope */ +export interface LdapSearchScopeOpt { + /** This specifies the user DN, which overrides the base DN for user lookups. */ + userDN?: string; + /** This specifies the group DN, which overrides the base DN for group lookups. */ + groupDN?: string; + /** This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. */ + groupMembershipFilter?: string; } /** Encryption settings */ @@ -365,12 +377,17 @@ export interface CapacityPool { readonly type?: string; /** Resource tags */ tags?: { [propertyName: string]: string }; + /** + * 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; /** * UUID v4 used to identify the Pool * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly poolId?: string; - /** Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). */ + /** Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104). */ size: number; /** The service level of the file system */ serviceLevel: ServiceLevel; @@ -418,7 +435,7 @@ export interface CapacityPoolPatch { readonly type?: string; /** Resource tags */ tags?: { [propertyName: string]: string }; - /** Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). */ + /** Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104). */ size?: number; /** The qos type of the pool */ qosType?: QosType; @@ -458,6 +475,11 @@ export interface Volume { readonly type?: string; /** Resource tags */ tags?: { [propertyName: string]: string }; + /** + * 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; /** * Unique FileSystem Identifier. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -547,6 +569,11 @@ export interface Volume { defaultUserQuotaInKiBs?: number; /** Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ defaultGroupQuotaInKiBs?: number; + /** + * Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maximumNumberOfFiles?: number; /** * Volume Group Name * NOTE: This property will not be serialized. It can only be populated by the server. @@ -565,6 +592,8 @@ export interface Volume { volumeSpecName?: string; /** Application specific placement rules for the particular volume */ placementRules?: PlacementKeyValuePairs[]; + /** Flag indicating whether subvolume operations are enabled on the volume */ + enableSubvolumes?: EnableSubvolumes; } /** Set of export policy rules */ @@ -712,6 +741,8 @@ export interface VolumePatch { defaultUserQuotaInKiBs?: number; /** Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ defaultGroupQuotaInKiBs?: number; + /** UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. */ + unixPermissions?: string; } /** Set of export policy rules */ @@ -808,6 +839,14 @@ export interface Snapshot { readonly provisioningState?: string; } +/** Restore payload for Single File Snapshot Restore */ +export interface SnapshotRestoreFiles { + /** List of files to be restored */ + filePaths: string[]; + /** Destination folder where the files will be restored */ + destinationPath?: string; +} + /** List of Snapshot Policies */ export interface SnapshotPoliciesList { /** A list of snapshot policies */ @@ -840,6 +879,11 @@ export interface SnapshotPolicy { readonly type?: string; /** Resource tags */ tags?: { [propertyName: string]: string }; + /** + * 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; /** Schedule for hourly snapshots */ hourlySchedule?: HourlySchedule; /** Schedule for daily snapshots */ @@ -1172,6 +1216,11 @@ export interface BackupPolicy { readonly type?: string; /** Resource tags */ tags?: { [propertyName: string]: string }; + /** + * 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; /** * Backup Policy Resource ID * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1484,6 +1533,11 @@ export interface VolumeGroupVolumeProperties { defaultUserQuotaInKiBs?: number; /** Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ defaultGroupQuotaInKiBs?: number; + /** + * Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maximumNumberOfFiles?: number; /** * Volume Group Name * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1502,6 +1556,63 @@ export interface VolumeGroupVolumeProperties { volumeSpecName?: string; /** Application specific placement rules for the particular volume */ placementRules?: PlacementKeyValuePairs[]; + /** Flag indicating whether subvolume operations are enabled on the volume */ + enableSubvolumes?: EnableSubvolumes; +} + +/** List of Subvolumes */ +export interface SubvolumesList { + /** A list of Subvolumes */ + value?: SubvolumeInfo[]; + /** URL to get the next set of results. */ + nextLink?: string; +} + +/** Subvolume Patch Request properties */ +export interface SubvolumePatchRequest { + /** Truncate subvolume to the provided size in bytes */ + size?: number; + /** path to the subvolume */ + path?: string; +} + +/** Result of the post subvolume and action is to get metadata of the subvolume. */ +export interface SubvolumeModel { + /** + * 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; + /** Path to the subvolume */ + path?: string; + /** Path to the parent subvolume */ + parentPath?: string; + /** Size of subvolume */ + size?: number; + /** Bytes used */ + bytesUsed?: number; + /** Permissions of the subvolume */ + permissions?: string; + /** Creation time and date */ + creationTimeStamp?: Date; + /** Most recent access time and date */ + accessedTimeStamp?: Date; + /** Most recent modification time and date */ + modifiedTimeStamp?: Date; + /** Most recent change time and date */ + changedTimeStamp?: Date; + /** Azure lifecycle management */ + provisioningState?: string; } /** Identity for the resource. */ @@ -1668,6 +1779,26 @@ export type SubscriptionQuotaItem = ProxyResource & { readonly default?: number; }; +/** Subvolume Information properties */ +export type SubvolumeInfo = ProxyResource & { + /** + * 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; + /** Path to the subvolume */ + path?: string; + /** Truncate subvolume to the provided size in bytes */ + size?: number; + /** parent path to the subvolume */ + parentPath?: string; + /** + * Azure lifecycle management + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +}; + /** Known values of {@link MetricAggregationType} that the service accepts. */ export enum KnownMetricAggregationType { Average = "Average" @@ -1968,6 +2099,24 @@ export enum KnownAvsDataStore { */ export type AvsDataStore = string; +/** Known values of {@link EnableSubvolumes} that the service accepts. */ +export enum KnownEnableSubvolumes { + /** subvolumes are enabled */ + Enabled = "Enabled", + /** subvolumes are not enabled */ + Disabled = "Disabled" +} + +/** + * Defines values for EnableSubvolumes. \ + * {@link KnownEnableSubvolumes} can be used interchangeably with EnableSubvolumes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: subvolumes are enabled \ + * **Disabled**: subvolumes are not enabled + */ +export type EnableSubvolumes = string; + /** Known values of {@link RelationshipStatus} that the service accepts. */ export enum KnownRelationshipStatus { Idle = "Idle", @@ -2234,6 +2383,8 @@ export type VolumesUpdateResponse = Volume; /** Optional parameters. */ export interface VolumesDeleteOptionalParams extends coreClient.OperationOptions { + /** An option to force delete the volume. Will cleanup resources connected to the particular volume */ + forceDelete?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -2366,6 +2517,15 @@ export interface SnapshotsDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface SnapshotsRestoreFilesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface SnapshotPoliciesListOptionalParams extends coreClient.OperationOptions {} @@ -2588,6 +2748,72 @@ export interface VolumeGroupsDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface SubvolumesListByVolumeOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVolume operation. */ +export type SubvolumesListByVolumeResponse = SubvolumesList; + +/** Optional parameters. */ +export interface SubvolumesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SubvolumesGetResponse = SubvolumeInfo; + +/** Optional parameters. */ +export interface SubvolumesCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type SubvolumesCreateResponse = SubvolumeInfo; + +/** Optional parameters. */ +export interface SubvolumesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type SubvolumesUpdateResponse = SubvolumeInfo; + +/** Optional parameters. */ +export interface SubvolumesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SubvolumesGetMetadataOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the getMetadata operation. */ +export type SubvolumesGetMetadataResponse = SubvolumeModel; + +/** Optional parameters. */ +export interface SubvolumesListByVolumeNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVolumeNext operation. */ +export type SubvolumesListByVolumeNextResponse = SubvolumesList; + /** Optional parameters. */ export interface NetAppManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/netapp/arm-netapp/src/models/mappers.ts b/sdk/netapp/arm-netapp/src/models/mappers.ts index f722fc43fd38..0616182ef74d 100644 --- a/sdk/netapp/arm-netapp/src/models/mappers.ts +++ b/sdk/netapp/arm-netapp/src/models/mappers.ts @@ -789,6 +789,49 @@ export const ActiveDirectory: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + ldapSearchScope: { + serializedName: "ldapSearchScope", + type: { + name: "Composite", + className: "LdapSearchScopeOpt" + } + } + } + } +}; + +export const LdapSearchScopeOpt: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LdapSearchScopeOpt", + modelProperties: { + userDN: { + constraints: { + MaxLength: 255 + }, + serializedName: "userDN", + type: { + name: "String" + } + }, + groupDN: { + constraints: { + MaxLength: 255 + }, + serializedName: "groupDN", + type: { + name: "String" + } + }, + groupMembershipFilter: { + constraints: { + MaxLength: 255 + }, + serializedName: "groupMembershipFilter", + type: { + name: "String" + } } } } @@ -989,6 +1032,13 @@ export const CapacityPool: coreClient.CompositeMapper = { value: { type: { name: "String" } } } }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, poolId: { constraints: { Pattern: new RegExp( @@ -1004,10 +1054,7 @@ export const CapacityPool: coreClient.CompositeMapper = { } }, size: { - constraints: { - InclusiveMaximum: 549755813888000, - InclusiveMinimum: 4398046511104 - }, + defaultValue: 4398046511104, serializedName: "properties.size", required: true, type: { @@ -1109,10 +1156,6 @@ export const CapacityPoolPatch: coreClient.CompositeMapper = { }, size: { defaultValue: 4398046511104, - constraints: { - InclusiveMaximum: 549755813888000, - InclusiveMinimum: 4398046511104 - }, serializedName: "properties.size", type: { name: "Number" @@ -1202,6 +1245,13 @@ export const Volume: coreClient.CompositeMapper = { value: { type: { name: "String" } } } }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, fileSystemId: { constraints: { Pattern: new RegExp( @@ -1494,6 +1544,13 @@ export const Volume: coreClient.CompositeMapper = { name: "Number" } }, + maximumNumberOfFiles: { + serializedName: "properties.maximumNumberOfFiles", + readOnly: true, + type: { + name: "Number" + } + }, volumeGroupName: { serializedName: "properties.volumeGroupName", readOnly: true, @@ -1537,6 +1594,13 @@ export const Volume: coreClient.CompositeMapper = { } } } + }, + enableSubvolumes: { + defaultValue: "Disabled", + serializedName: "properties.enableSubvolumes", + type: { + name: "String" + } } } } @@ -1959,6 +2023,17 @@ export const VolumePatch: coreClient.CompositeMapper = { type: { name: "Number" } + }, + unixPermissions: { + constraints: { + MaxLength: 4, + MinLength: 4 + }, + serializedName: "properties.unixPermissions", + nullable: true, + type: { + name: "String" + } } } } @@ -2194,6 +2269,41 @@ export const Snapshot: coreClient.CompositeMapper = { } }; +export const SnapshotRestoreFiles: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SnapshotRestoreFiles", + modelProperties: { + filePaths: { + constraints: { + MinItems: 1, + MaxItems: 10 + }, + serializedName: "filePaths", + required: true, + type: { + name: "Sequence", + element: { + constraints: { + MaxLength: 1024, + MinLength: 1 + }, + type: { + name: "String" + } + } + } + }, + destinationPath: { + serializedName: "destinationPath", + type: { + name: "String" + } + } + } + } +}; + export const SnapshotPoliciesList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2262,6 +2372,13 @@ export const SnapshotPolicy: coreClient.CompositeMapper = { value: { type: { name: "String" } } } }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, hourlySchedule: { serializedName: "properties.hourlySchedule", type: { @@ -2946,6 +3063,13 @@ export const BackupPolicy: coreClient.CompositeMapper = { value: { type: { name: "String" } } } }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, backupPolicyId: { serializedName: "properties.backupPolicyId", readOnly: true, @@ -3723,6 +3847,13 @@ export const VolumeGroupVolumeProperties: coreClient.CompositeMapper = { name: "Number" } }, + maximumNumberOfFiles: { + serializedName: "properties.maximumNumberOfFiles", + readOnly: true, + type: { + name: "Number" + } + }, volumeGroupName: { serializedName: "properties.volumeGroupName", readOnly: true, @@ -3766,6 +3897,152 @@ export const VolumeGroupVolumeProperties: coreClient.CompositeMapper = { } } } + }, + enableSubvolumes: { + defaultValue: "Disabled", + serializedName: "properties.enableSubvolumes", + type: { + name: "String" + } + } + } + } +}; + +export const SubvolumesList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubvolumesList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubvolumeInfo" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SubvolumePatchRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubvolumePatchRequest", + modelProperties: { + size: { + serializedName: "properties.size", + nullable: true, + type: { + name: "Number" + } + }, + path: { + serializedName: "properties.path", + type: { + name: "String" + } + } + } + } +}; + +export const SubvolumeModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubvolumeModel", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + path: { + serializedName: "properties.path", + type: { + name: "String" + } + }, + parentPath: { + serializedName: "properties.parentPath", + type: { + name: "String" + } + }, + size: { + serializedName: "properties.size", + type: { + name: "Number" + } + }, + bytesUsed: { + serializedName: "properties.bytesUsed", + type: { + name: "Number" + } + }, + permissions: { + serializedName: "properties.permissions", + type: { + name: "String" + } + }, + creationTimeStamp: { + serializedName: "properties.creationTimeStamp", + type: { + name: "DateTime" + } + }, + accessedTimeStamp: { + serializedName: "properties.accessedTimeStamp", + type: { + name: "DateTime" + } + }, + modifiedTimeStamp: { + serializedName: "properties.modifiedTimeStamp", + type: { + name: "DateTime" + } + }, + changedTimeStamp: { + serializedName: "properties.changedTimeStamp", + type: { + name: "DateTime" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } } } } @@ -4110,3 +4387,47 @@ export const SubscriptionQuotaItem: coreClient.CompositeMapper = { } } }; + +export const SubvolumeInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubvolumeInfo", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + path: { + serializedName: "properties.path", + type: { + name: "String" + } + }, + size: { + serializedName: "properties.size", + nullable: true, + type: { + name: "Number" + } + }, + parentPath: { + serializedName: "properties.parentPath", + nullable: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/netapp/arm-netapp/src/models/parameters.ts b/sdk/netapp/arm-netapp/src/models/parameters.ts index 4a5b9b1b405b..c56539b94245 100644 --- a/sdk/netapp/arm-netapp/src/models/parameters.ts +++ b/sdk/netapp/arm-netapp/src/models/parameters.ts @@ -26,13 +26,16 @@ import { AuthorizeRequest as AuthorizeRequestMapper, PoolChangeRequest as PoolChangeRequestMapper, Snapshot as SnapshotMapper, + SnapshotRestoreFiles as SnapshotRestoreFilesMapper, SnapshotPolicy as SnapshotPolicyMapper, SnapshotPolicyPatch as SnapshotPolicyPatchMapper, Backup as BackupMapper, BackupPatch as BackupPatchMapper, BackupPolicy as BackupPolicyMapper, BackupPolicyPatch as BackupPolicyPatchMapper, - VolumeGroupDetails as VolumeGroupDetailsMapper + VolumeGroupDetails as VolumeGroupDetailsMapper, + SubvolumeInfo as SubvolumeInfoMapper, + SubvolumePatchRequest as SubvolumePatchRequestMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -62,7 +65,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-08-01", + defaultValue: "2021-10-01", isConstant: true, serializedName: "api-version", type: { @@ -257,6 +260,16 @@ export const body8: OperationParameter = { mapper: VolumePatchMapper }; +export const forceDelete: OperationQueryParameter = { + parameterPath: ["options", "forceDelete"], + mapper: { + serializedName: "forceDelete", + type: { + name: "Boolean" + } + } +}; + export const body9: OperationParameter = { parameterPath: "body", mapper: VolumeRevertMapper @@ -305,6 +318,11 @@ export const body14: OperationParameter = { } }; +export const body15: OperationParameter = { + parameterPath: "body", + mapper: SnapshotRestoreFilesMapper +}; + export const snapshotPolicyName: OperationURLParameter = { parameterPath: "snapshotPolicyName", mapper: { @@ -316,12 +334,12 @@ export const snapshotPolicyName: OperationURLParameter = { } }; -export const body15: OperationParameter = { +export const body16: OperationParameter = { parameterPath: "body", mapper: SnapshotPolicyMapper }; -export const body16: OperationParameter = { +export const body17: OperationParameter = { parameterPath: "body", mapper: SnapshotPolicyPatchMapper }; @@ -337,12 +355,12 @@ export const backupName: OperationURLParameter = { } }; -export const body17: OperationParameter = { +export const body18: OperationParameter = { parameterPath: "body", mapper: BackupMapper }; -export const body18: OperationParameter = { +export const body19: OperationParameter = { parameterPath: ["options", "body"], mapper: BackupPatchMapper }; @@ -358,12 +376,12 @@ export const backupPolicyName: OperationURLParameter = { } }; -export const body19: OperationParameter = { +export const body20: OperationParameter = { parameterPath: "body", mapper: BackupPolicyMapper }; -export const body20: OperationParameter = { +export const body21: OperationParameter = { parameterPath: "body", mapper: BackupPolicyPatchMapper }; @@ -384,7 +402,33 @@ export const volumeGroupName: OperationURLParameter = { } }; -export const body21: OperationParameter = { +export const body22: OperationParameter = { parameterPath: "body", mapper: VolumeGroupDetailsMapper }; + +export const subvolumeName: OperationURLParameter = { + parameterPath: "subvolumeName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$"), + MaxLength: 64, + MinLength: 1 + }, + serializedName: "subvolumeName", + required: true, + type: { + name: "String" + } + } +}; + +export const body23: OperationParameter = { + parameterPath: "body", + mapper: SubvolumeInfoMapper +}; + +export const body24: OperationParameter = { + parameterPath: "body", + mapper: SubvolumePatchRequestMapper +}; diff --git a/sdk/netapp/arm-netapp/src/netAppManagementClient.ts b/sdk/netapp/arm-netapp/src/netAppManagementClient.ts index 52b8477db466..68430b97ffd6 100644 --- a/sdk/netapp/arm-netapp/src/netAppManagementClient.ts +++ b/sdk/netapp/arm-netapp/src/netAppManagementClient.ts @@ -21,7 +21,8 @@ import { AccountBackupsImpl, BackupPoliciesImpl, VaultsImpl, - VolumeGroupsImpl + VolumeGroupsImpl, + SubvolumesImpl } from "./operations"; import { Operations, @@ -36,7 +37,8 @@ import { AccountBackups, BackupPolicies, Vaults, - VolumeGroups + VolumeGroups, + Subvolumes } from "./operationsInterfaces"; import { NetAppManagementClientOptionalParams } from "./models"; @@ -73,7 +75,7 @@ export class NetAppManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-netapp/15.0.0`; + const packageDetails = `azsdk-js-arm-netapp/15.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -96,7 +98,7 @@ export class NetAppManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-08-01"; + this.apiVersion = options.apiVersion || "2021-10-01"; this.operations = new OperationsImpl(this); this.netAppResource = new NetAppResourceImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsImpl(this); @@ -110,6 +112,7 @@ export class NetAppManagementClient extends coreClient.ServiceClient { this.backupPolicies = new BackupPoliciesImpl(this); this.vaults = new VaultsImpl(this); this.volumeGroups = new VolumeGroupsImpl(this); + this.subvolumes = new SubvolumesImpl(this); } operations: Operations; @@ -125,4 +128,5 @@ export class NetAppManagementClient extends coreClient.ServiceClient { backupPolicies: BackupPolicies; vaults: Vaults; volumeGroups: VolumeGroups; + subvolumes: Subvolumes; } diff --git a/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts b/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts index fa08e6495395..e61cf620d53f 100644 --- a/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts +++ b/sdk/netapp/arm-netapp/src/operations/backupPolicies.ts @@ -466,7 +466,7 @@ const createOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body19, + requestBody: Parameters.body20, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -498,7 +498,7 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body20, + requestBody: Parameters.body21, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/netapp/arm-netapp/src/operations/backups.ts b/sdk/netapp/arm-netapp/src/operations/backups.ts index 3c8ff14640ba..97a5aa3f7e9c 100644 --- a/sdk/netapp/arm-netapp/src/operations/backups.ts +++ b/sdk/netapp/arm-netapp/src/operations/backups.ts @@ -643,7 +643,7 @@ const createOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body17, + requestBody: Parameters.body18, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -677,7 +677,7 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body18, + requestBody: Parameters.body19, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/netapp/arm-netapp/src/operations/index.ts b/sdk/netapp/arm-netapp/src/operations/index.ts index f7bd6727d8ca..cec2cd1de8a7 100644 --- a/sdk/netapp/arm-netapp/src/operations/index.ts +++ b/sdk/netapp/arm-netapp/src/operations/index.ts @@ -19,3 +19,4 @@ export * from "./accountBackups"; export * from "./backupPolicies"; export * from "./vaults"; export * from "./volumeGroups"; +export * from "./subvolumes"; diff --git a/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts b/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts index fc2b1d058bd6..7deab79459f3 100644 --- a/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts +++ b/sdk/netapp/arm-netapp/src/operations/snapshotPolicies.ts @@ -406,7 +406,7 @@ const createOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body15, + requestBody: Parameters.body16, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -438,7 +438,7 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body16, + requestBody: Parameters.body17, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/netapp/arm-netapp/src/operations/snapshots.ts b/sdk/netapp/arm-netapp/src/operations/snapshots.ts index e3848b734a4f..efda5346ae03 100644 --- a/sdk/netapp/arm-netapp/src/operations/snapshots.ts +++ b/sdk/netapp/arm-netapp/src/operations/snapshots.ts @@ -24,7 +24,9 @@ import { SnapshotsCreateResponse, SnapshotsUpdateOptionalParams, SnapshotsUpdateResponse, - SnapshotsDeleteOptionalParams + SnapshotsDeleteOptionalParams, + SnapshotRestoreFiles, + SnapshotsRestoreFilesOptionalParams } from "../models"; /// @@ -497,6 +499,114 @@ export class SnapshotsImpl implements Snapshots { ); return poller.pollUntilDone(); } + + /** + * Restore the specified files from the specified snapshot to the active filesystem + * @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 snapshot + * @param body Restore payload supplied in the body of the operation. + * @param options The options parameters. + */ + async beginRestoreFiles( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: SnapshotRestoreFiles, + options?: SnapshotsRestoreFilesOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + poolName, + volumeName, + snapshotName, + body, + options + }, + restoreFilesOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Restore the specified files from the specified snapshot to the active filesystem + * @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 snapshot + * @param body Restore payload supplied in the body of the operation. + * @param options The options parameters. + */ + async beginRestoreFilesAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: SnapshotRestoreFiles, + options?: SnapshotsRestoreFilesOptionalParams + ): Promise { + const poller = await this.beginRestoreFiles( + resourceGroupName, + accountName, + poolName, + volumeName, + snapshotName, + body, + options + ); + return poller.pollUntilDone(); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -631,3 +741,23 @@ const deleteOperationSpec: coreClient.OperationSpec = { ], serializer }; +const restoreFilesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}/restoreFiles", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.body15, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.snapshotName + ], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/netapp/arm-netapp/src/operations/subvolumes.ts b/sdk/netapp/arm-netapp/src/operations/subvolumes.ts new file mode 100644 index 000000000000..35f945013464 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operations/subvolumes.ts @@ -0,0 +1,843 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Subvolumes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetAppManagementClient } from "../netAppManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + SubvolumeInfo, + SubvolumesListByVolumeNextOptionalParams, + SubvolumesListByVolumeOptionalParams, + SubvolumesListByVolumeResponse, + SubvolumesGetOptionalParams, + SubvolumesGetResponse, + SubvolumesCreateOptionalParams, + SubvolumesCreateResponse, + SubvolumePatchRequest, + SubvolumesUpdateOptionalParams, + SubvolumesUpdateResponse, + SubvolumesDeleteOptionalParams, + SubvolumesGetMetadataOptionalParams, + SubvolumesGetMetadataResponse, + SubvolumesListByVolumeNextResponse +} from "../models"; + +/// +/** Class containing Subvolumes operations. */ +export class SubvolumesImpl implements Subvolumes { + private readonly client: NetAppManagementClient; + + /** + * Initialize a new instance of the class Subvolumes class. + * @param client Reference to the service client + */ + constructor(client: NetAppManagementClient) { + this.client = client; + } + + /** + * Returns a list of the subvolumes in the 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 options parameters. + */ + public listByVolume( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SubvolumesListByVolumeOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByVolumePagingAll( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByVolumePagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + } + }; + } + + private async *listByVolumePagingPage( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SubvolumesListByVolumeOptionalParams + ): AsyncIterableIterator { + let result = await this._listByVolume( + resourceGroupName, + accountName, + poolName, + volumeName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByVolumeNext( + resourceGroupName, + accountName, + poolName, + volumeName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByVolumePagingAll( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SubvolumesListByVolumeOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByVolumePagingPage( + resourceGroupName, + accountName, + poolName, + volumeName, + options + )) { + yield* page; + } + } + + /** + * Returns a list of the subvolumes in the 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 options parameters. + */ + private _listByVolume( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SubvolumesListByVolumeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, poolName, volumeName, options }, + listByVolumeOperationSpec + ); + } + + /** + * Returns the path associated with the subvolumeName provided + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + options + }, + getOperationSpec + ); + } + + /** + * Creates a subvolume in the path or clones the subvolume mentioned in the parentPath + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumeInfo, + options?: SubvolumesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubvolumesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + body, + options + }, + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Creates a subvolume in the path or clones the subvolume mentioned in the parentPath + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumeInfo, + options?: SubvolumesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Patch a subvolume + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumePatchRequest, + options?: SubvolumesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubvolumesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + body, + options + }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Patch a subvolume + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumePatchRequest, + options?: SubvolumesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + body, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + options + }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Delete subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get details of the specified subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + async beginGetMetadata( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesGetMetadataOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubvolumesGetMetadataResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + options + }, + getMetadataOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Get details of the specified subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + async beginGetMetadataAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesGetMetadataOptionalParams + ): Promise { + const poller = await this.beginGetMetadata( + resourceGroupName, + accountName, + poolName, + volumeName, + subvolumeName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByVolumeNext + * @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 nextLink The nextLink from the previous successful call to the ListByVolume method. + * @param options The options parameters. + */ + private _listByVolumeNext( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + nextLink: string, + options?: SubvolumesListByVolumeNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + poolName, + volumeName, + nextLink, + options + }, + listByVolumeNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByVolumeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubvolumesList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubvolumeInfo + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.subvolumeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SubvolumeInfo + }, + 201: { + bodyMapper: Mappers.SubvolumeInfo + }, + 202: { + bodyMapper: Mappers.SubvolumeInfo + }, + 204: { + bodyMapper: Mappers.SubvolumeInfo + }, + default: {} + }, + requestBody: Parameters.body23, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.subvolumeName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SubvolumeInfo + }, + 201: { + bodyMapper: Mappers.SubvolumeInfo + }, + 202: { + bodyMapper: Mappers.SubvolumeInfo + }, + 204: { + bodyMapper: Mappers.SubvolumeInfo + }, + default: {} + }, + requestBody: Parameters.body24, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.subvolumeName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.subvolumeName + ], + serializer +}; +const getMetadataOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.SubvolumeModel + }, + 201: { + bodyMapper: Mappers.SubvolumeModel + }, + 202: { + bodyMapper: Mappers.SubvolumeModel + }, + 204: { + bodyMapper: Mappers.SubvolumeModel + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName, + Parameters.subvolumeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByVolumeNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SubvolumesList + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + Parameters.poolName, + Parameters.volumeName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts b/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts index 05ddd2287ad6..223227815f61 100644 --- a/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts +++ b/sdk/netapp/arm-netapp/src/operations/volumeGroups.ts @@ -378,7 +378,7 @@ const createOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.body21, + requestBody: Parameters.body22, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/netapp/arm-netapp/src/operations/volumes.ts b/sdk/netapp/arm-netapp/src/operations/volumes.ts index 9869c054324a..c5f79c3d846b 100644 --- a/sdk/netapp/arm-netapp/src/operations/volumes.ts +++ b/sdk/netapp/arm-netapp/src/operations/volumes.ts @@ -1282,7 +1282,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.forceDelete], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts index f7bd6727d8ca..cec2cd1de8a7 100644 --- a/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/index.ts @@ -19,3 +19,4 @@ export * from "./accountBackups"; export * from "./backupPolicies"; export * from "./vaults"; export * from "./volumeGroups"; +export * from "./subvolumes"; diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts index ae359c2df859..636da031483e 100644 --- a/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/snapshots.ts @@ -17,7 +17,9 @@ import { SnapshotsCreateResponse, SnapshotsUpdateOptionalParams, SnapshotsUpdateResponse, - SnapshotsDeleteOptionalParams + SnapshotsDeleteOptionalParams, + SnapshotRestoreFiles, + SnapshotsRestoreFilesOptionalParams } from "../models"; /// @@ -175,4 +177,42 @@ export interface Snapshots { snapshotName: string, options?: SnapshotsDeleteOptionalParams ): Promise; + /** + * Restore the specified files from the specified snapshot to the active filesystem + * @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 snapshot + * @param body Restore payload supplied in the body of the operation. + * @param options The options parameters. + */ + beginRestoreFiles( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: SnapshotRestoreFiles, + options?: SnapshotsRestoreFilesOptionalParams + ): Promise, void>>; + /** + * Restore the specified files from the specified snapshot to the active filesystem + * @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 snapshot + * @param body Restore payload supplied in the body of the operation. + * @param options The options parameters. + */ + beginRestoreFilesAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + snapshotName: string, + body: SnapshotRestoreFiles, + options?: SnapshotsRestoreFilesOptionalParams + ): Promise; } diff --git a/sdk/netapp/arm-netapp/src/operationsInterfaces/subvolumes.ts b/sdk/netapp/arm-netapp/src/operationsInterfaces/subvolumes.ts new file mode 100644 index 000000000000..eeaa6fdc9783 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operationsInterfaces/subvolumes.ts @@ -0,0 +1,220 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + SubvolumeInfo, + SubvolumesListByVolumeOptionalParams, + SubvolumesGetOptionalParams, + SubvolumesGetResponse, + SubvolumesCreateOptionalParams, + SubvolumesCreateResponse, + SubvolumePatchRequest, + SubvolumesUpdateOptionalParams, + SubvolumesUpdateResponse, + SubvolumesDeleteOptionalParams, + SubvolumesGetMetadataOptionalParams, + SubvolumesGetMetadataResponse +} from "../models"; + +/// +/** Interface representing a Subvolumes. */ +export interface Subvolumes { + /** + * Returns a list of the subvolumes in the 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 options parameters. + */ + listByVolume( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + options?: SubvolumesListByVolumeOptionalParams + ): PagedAsyncIterableIterator; + /** + * Returns the path associated with the subvolumeName provided + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesGetOptionalParams + ): Promise; + /** + * Creates a subvolume in the path or clones the subvolume mentioned in the parentPath + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumeInfo, + options?: SubvolumesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubvolumesCreateResponse + > + >; + /** + * Creates a subvolume in the path or clones the subvolume mentioned in the parentPath + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumeInfo, + options?: SubvolumesCreateOptionalParams + ): Promise; + /** + * Patch a subvolume + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumePatchRequest, + options?: SubvolumesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubvolumesUpdateResponse + > + >; + /** + * Patch a subvolume + * @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 subvolumeName The name of the subvolume. + * @param body Subvolume object supplied in the body of the operation. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + body: SubvolumePatchRequest, + options?: SubvolumesUpdateOptionalParams + ): Promise; + /** + * Delete subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesDeleteOptionalParams + ): Promise; + /** + * Get details of the specified subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + beginGetMetadata( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesGetMetadataOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SubvolumesGetMetadataResponse + > + >; + /** + * Get details of the specified subvolume + * @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 subvolumeName The name of the subvolume. + * @param options The options parameters. + */ + beginGetMetadataAndWait( + resourceGroupName: string, + accountName: string, + poolName: string, + volumeName: string, + subvolumeName: string, + options?: SubvolumesGetMetadataOptionalParams + ): Promise; +} diff --git a/sdk/netapp/arm-netapp/tsconfig.json b/sdk/netapp/arm-netapp/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/netapp/arm-netapp/tsconfig.json +++ b/sdk/netapp/arm-netapp/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file