diff --git a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts index cea717cc0752..df1278d47200 100644 --- a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts +++ b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClient.ts @@ -23,6 +23,7 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC volumes: operations.Volumes; snapshots: operations.Snapshots; snapshotPolicies: operations.SnapshotPolicies; + volumeBackupStatus: operations.VolumeBackupStatus; accountBackups: operations.AccountBackups; backups: operations.Backups; backupPolicies: operations.BackupPolicies; @@ -44,6 +45,7 @@ class AzureNetAppFilesManagementClient extends AzureNetAppFilesManagementClientC this.volumes = new operations.Volumes(this); this.snapshots = new operations.Snapshots(this); this.snapshotPolicies = new operations.SnapshotPolicies(this); + this.volumeBackupStatus = new operations.VolumeBackupStatus(this); this.accountBackups = new operations.AccountBackups(this); this.backups = new operations.Backups(this); this.backupPolicies = new operations.BackupPolicies(this); diff --git a/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts b/sdk/netapp/arm-netapp/src/azureNetAppFilesManagementClientContext.ts index 5eedd0364b25..f3bd6cafeaec 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-11-01'; + this.apiVersion = '2020-12-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/index.ts b/sdk/netapp/arm-netapp/src/models/index.ts index dec93706f969..a70ce9592bcc 100644 --- a/sdk/netapp/arm-netapp/src/models/index.ts +++ b/sdk/netapp/arm-netapp/src/models/index.ts @@ -274,6 +274,11 @@ export interface ActiveDirectory { * Specifies whether or not the LDAP traffic needs to be secured via TLS. */ ldapOverTLS?: boolean; + /** + * If enabled, NFS client local users can also (in addition to LDAP users) access the NFS + * volumes. + */ + allowLocalNfsUsersWithLdap?: boolean; } /** @@ -281,10 +286,9 @@ export interface ActiveDirectory { */ export interface AccountEncryption { /** - * Encryption Key Source. Possible values are: 'Microsoft.NetApp'. Possible values include: - * 'Microsoft.NetApp' + * Encryption Key Source. Possible values are: 'Microsoft.NetApp'. */ - keySource?: KeySource; + keySource?: string; } /** @@ -823,6 +827,30 @@ export interface Volume extends BaseResource { * Encryption Key Source. Possible values are: 'Microsoft.NetApp' */ encryptionKeySource?: string; + /** + * Specifies whether LDAP is enabled or not for a given NFS volume. Default value: false. + */ + ldapEnabled?: boolean; +} + +/** + * An interface representing ResourceIdentity. + */ +export interface ResourceIdentity { + /** + * Object id of the identity resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant id of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * Type of Identity. Supported values are: 'None', 'SystemAssigned' + */ + type?: string; } /** @@ -1133,11 +1161,6 @@ export interface SnapshotPolicy extends BaseResource { * Resource tags */ tags?: { [propertyName: string]: string }; - /** - * Snapshot policy name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name1?: string; /** * hourlySchedule. Schedule for hourly snapshots */ @@ -1192,11 +1215,6 @@ export interface SnapshotPolicyDetails { * Resource tags */ tags?: { [propertyName: string]: string }; - /** - * Snapshot policy name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name1?: string; /** * hourlySchedule. Schedule for hourly snapshots */ @@ -1251,11 +1269,6 @@ export interface SnapshotPolicyPatch { * Resource tags */ tags?: { [propertyName: string]: string }; - /** - * Snapshot policy name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name1?: string; /** * hourlySchedule. Schedule for hourly snapshots */ @@ -1382,15 +1395,20 @@ export interface Backup extends BaseResource { */ label?: string; /** - * Type of backup adhoc or scheduled + * backupType. Type of backup Manual or Scheduled. Possible values include: 'Manual', 'Scheduled' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly backupType?: string; + readonly backupType?: BackupType; /** * Failure reason * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly failureReason?: string; + /** + * Volume name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly volumeName?: string; } /** @@ -1426,15 +1444,20 @@ export interface BackupPatch extends BaseResource { */ label?: string; /** - * Type of backup adhoc or scheduled + * backupType. Type of backup Manual or Scheduled. Possible values include: 'Manual', 'Scheduled' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly backupType?: string; + readonly backupType?: BackupType; /** * Failure reason * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly failureReason?: string; + /** + * Volume name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly volumeName?: string; } /** @@ -1685,6 +1708,37 @@ export interface Vault extends BaseResource { vaultName?: string; } +/** + * Backup status + */ +export interface BackupStatus { + /** + * Backup health status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly healthy?: boolean; + /** + * Status of the backup mirror relationship. Possible values include: 'Idle', 'Transferring' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly relationshipStatus?: RelationshipStatus; + /** + * The status of the backup. Possible values include: 'Uninitialized', 'Mirrored', 'Broken' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly mirrorState?: MirrorState; + /** + * Reason for the unhealthy backup relationship + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unhealthyReason?: string; + /** + * Displays error message if the backup is in an error state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorMessage?: string; +} + /** * Optional Parameters. */ @@ -1925,14 +1979,6 @@ 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' @@ -1997,6 +2043,14 @@ export type RelationshipStatus = 'Idle' | 'Transferring'; */ export type MirrorState = 'Uninitialized' | 'Mirrored' | 'Broken'; +/** + * Defines values for BackupType. + * Possible values include: 'Manual', 'Scheduled' + * @readonly + * @enum {string} + */ +export type BackupType = 'Manual' | 'Scheduled'; + /** * Contains response data for the list operation. */ @@ -2757,6 +2811,26 @@ export type SnapshotPoliciesBeginUpdateResponse = SnapshotPolicy & { }; }; +/** + * Contains response data for the get operation. + */ +export type VolumeBackupStatusGetResponse = BackupStatus & { + /** + * 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: BackupStatus; + }; +}; + /** * 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 6a45231581ce..d74465cf0154 100644 --- a/sdk/netapp/arm-netapp/src/models/mappers.ts +++ b/sdk/netapp/arm-netapp/src/models/mappers.ts @@ -427,6 +427,12 @@ export const ActiveDirectory: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + allowLocalNfsUsersWithLdap: { + serializedName: "allowLocalNfsUsersWithLdap", + type: { + name: "Boolean" + } } } } @@ -1340,8 +1346,7 @@ export const Volume: msRest.CompositeMapper = { defaultValue: 0, constraints: { InclusiveMaximum: 4500, - InclusiveMinimum: 0, - MultipleOf: 0.001 + InclusiveMinimum: 0 }, type: { name: "Number" @@ -1352,6 +1357,43 @@ export const Volume: msRest.CompositeMapper = { type: { name: "String" } + }, + ldapEnabled: { + serializedName: "properties.ldapEnabled", + defaultValue: false, + type: { + name: "Boolean" + } + } + } + } +}; + +export const ResourceIdentity: msRest.CompositeMapper = { + serializedName: "resourceIdentity", + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } } } } @@ -1509,8 +1551,7 @@ export const VolumePatch: msRest.CompositeMapper = { serializedName: "properties.throughputMibps", constraints: { InclusiveMaximum: 4500, - InclusiveMinimum: 1, - MultipleOf: 0.001 + InclusiveMinimum: 1 }, type: { name: "Number" @@ -1864,13 +1905,6 @@ export const SnapshotPolicy: msRest.CompositeMapper = { } } }, - name1: { - readOnly: true, - serializedName: "properties.name", - type: { - name: "String" - } - }, hourlySchedule: { serializedName: "properties.hourlySchedule", type: { @@ -1960,13 +1994,6 @@ export const SnapshotPolicyDetails: msRest.CompositeMapper = { } } }, - name1: { - readOnly: true, - serializedName: "properties.name", - type: { - name: "String" - } - }, hourlySchedule: { serializedName: "properties.hourlySchedule", type: { @@ -2056,13 +2083,6 @@ export const SnapshotPolicyPatch: msRest.CompositeMapper = { } } }, - name1: { - readOnly: true, - serializedName: "properties.name", - type: { - name: "String" - } - }, hourlySchedule: { serializedName: "properties.hourlySchedule", type: { @@ -2280,6 +2300,13 @@ export const Backup: msRest.CompositeMapper = { type: { name: "String" } + }, + volumeName: { + readOnly: true, + serializedName: "properties.volumeName", + type: { + name: "String" + } } } } @@ -2354,6 +2381,13 @@ export const BackupPatch: msRest.CompositeMapper = { type: { name: "String" } + }, + volumeName: { + readOnly: true, + serializedName: "properties.volumeName", + type: { + name: "String" + } } } } @@ -2762,6 +2796,51 @@ export const Vault: msRest.CompositeMapper = { } }; +export const BackupStatus: msRest.CompositeMapper = { + serializedName: "backupStatus", + type: { + name: "Composite", + className: "BackupStatus", + modelProperties: { + healthy: { + readOnly: true, + serializedName: "healthy", + type: { + name: "Boolean" + } + }, + relationshipStatus: { + readOnly: true, + serializedName: "relationshipStatus", + type: { + name: "String" + } + }, + mirrorState: { + readOnly: true, + serializedName: "mirrorState", + type: { + name: "String" + } + }, + unhealthyReason: { + readOnly: true, + serializedName: "unhealthyReason", + type: { + name: "String" + } + }, + errorMessage: { + readOnly: true, + serializedName: "errorMessage", + type: { + name: "String" + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { diff --git a/sdk/netapp/arm-netapp/src/models/parameters.ts b/sdk/netapp/arm-netapp/src/models/parameters.ts index 276f0e652ef4..5da67d7a0784 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-11-01', + defaultValue: '2020-12-01', type: { name: "String" } diff --git a/sdk/netapp/arm-netapp/src/models/volumeBackupStatusMappers.ts b/sdk/netapp/arm-netapp/src/models/volumeBackupStatusMappers.ts new file mode 100644 index 000000000000..093fed73a0a5 --- /dev/null +++ b/sdk/netapp/arm-netapp/src/models/volumeBackupStatusMappers.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export { + BackupStatus, + CloudError +} from "../models/mappers"; diff --git a/sdk/netapp/arm-netapp/src/operations/index.ts b/sdk/netapp/arm-netapp/src/operations/index.ts index f304f23eabe9..ea246000e9a0 100644 --- a/sdk/netapp/arm-netapp/src/operations/index.ts +++ b/sdk/netapp/arm-netapp/src/operations/index.ts @@ -14,6 +14,7 @@ export * from "./pools"; export * from "./volumes"; export * from "./snapshots"; export * from "./snapshotPolicies"; +export * from "./volumeBackupStatus"; export * from "./accountBackups"; export * from "./backups"; export * from "./backupPolicies"; diff --git a/sdk/netapp/arm-netapp/src/operations/volumeBackupStatus.ts b/sdk/netapp/arm-netapp/src/operations/volumeBackupStatus.ts new file mode 100644 index 000000000000..06f7788d587e --- /dev/null +++ b/sdk/netapp/arm-netapp/src/operations/volumeBackupStatus.ts @@ -0,0 +1,97 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/volumeBackupStatusMappers"; +import * as Parameters from "../models/parameters"; +import { AzureNetAppFilesManagementClientContext } from "../azureNetAppFilesManagementClientContext"; + +/** Class representing a VolumeBackupStatus. */ +export class VolumeBackupStatus { + private readonly client: AzureNetAppFilesManagementClientContext; + + /** + * Create a VolumeBackupStatus. + * @param {AzureNetAppFilesManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureNetAppFilesManagementClientContext) { + this.client = client; + } + + /** + * Get the status of the backup for a volume + * @summary Get volume's backup status + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param accountName The name of the NetApp account + * @param poolName The name of the capacity pool + * @param volumeName The name of the volume + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, poolName: string, volumeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + poolName, + volumeName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.poolName, + Parameters.volumeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BackupStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};