/// <summary> /// Create the specified volume group and volumes. Creating volume group will /// create all the volumes specified in request body implicitly. Once volumes /// are created using volume group, those will be treated as regular volumes /// thereafter. /// </summary> /// <remarks> /// Create a volume group along with specified volumes /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Volume Group object supplied in the body of the operation. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='volumeGroupName'> /// The name of the volumeGroup /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VolumeGroupDetails> BeginCreateAsync(this IVolumeGroupsOperations operations, VolumeGroupDetails body, string resourceGroupName, string accountName, string volumeGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateWithHttpMessagesAsync(body, resourceGroupName, accountName, volumeGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); NetAppResource = new NetAppResourceOperations(this); NetAppResourceQuotaLimits = new NetAppResourceQuotaLimitsOperations(this); Accounts = new AccountsOperations(this); Pools = new PoolsOperations(this); Volumes = new VolumesOperations(this); Snapshots = new SnapshotsOperations(this); SnapshotPolicies = new SnapshotPoliciesOperations(this); Backups = new BackupsOperations(this); AccountBackups = new AccountBackupsOperations(this); BackupPolicies = new BackupPoliciesOperations(this); Vaults = new VaultsOperations(this); VolumeGroups = new VolumeGroupsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2021-08-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Describe a Volume Group /// </summary> /// <remarks> /// Get details of the specified volume group /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='volumeGroupName'> /// The name of the volumeGroup /// </param> public static VolumeGroupDetails Get(this IVolumeGroupsOperations operations, string resourceGroupName, string accountName, string volumeGroupName) { return(operations.GetAsync(resourceGroupName, accountName, volumeGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Describe all volume groups /// </summary> /// <remarks> /// List all volume groups for given account /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <VolumeGroup> > ListByNetAppAccountAsync(this IVolumeGroupsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByNetAppAccountWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Describe all volume groups /// </summary> /// <remarks> /// List all volume groups for given account /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> public static IEnumerable <VolumeGroup> ListByNetAppAccount(this IVolumeGroupsOperations operations, string resourceGroupName, string accountName) { return(operations.ListByNetAppAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Delete a volume group /// </summary> /// <remarks> /// Delete the specified volume group only if there are no volumes under volume /// group. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='volumeGroupName'> /// The name of the volumeGroup /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IVolumeGroupsOperations operations, string resourceGroupName, string accountName, string volumeGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, volumeGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete a volume group /// </summary> /// <remarks> /// Delete the specified volume group only if there are no volumes under volume /// group. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='volumeGroupName'> /// The name of the volumeGroup /// </param> public static void BeginDelete(this IVolumeGroupsOperations operations, string resourceGroupName, string accountName, string volumeGroupName) { operations.BeginDeleteAsync(resourceGroupName, accountName, volumeGroupName).GetAwaiter().GetResult(); }
/// <summary> /// Create the specified volume group and volumes. Creating volume group will /// create all the volumes specified in request body implicitly. Once volumes /// are created using volume group, those will be treated as regular volumes /// thereafter. /// </summary> /// <remarks> /// Create a volume group along with specified volumes /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Volume Group object supplied in the body of the operation. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='accountName'> /// The name of the NetApp account /// </param> /// <param name='volumeGroupName'> /// The name of the volumeGroup /// </param> public static VolumeGroupDetails BeginCreate(this IVolumeGroupsOperations operations, VolumeGroupDetails body, string resourceGroupName, string accountName, string volumeGroupName) { return(operations.BeginCreateAsync(body, resourceGroupName, accountName, volumeGroupName).GetAwaiter().GetResult()); }