/// <summary> /// List management groups for the authenticated user. /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cacheControl'> /// Indicates whether the request should utilize any caches. Populate the /// header with 'no-cache' value to bypass existing caches. /// </param> /// <param name='skiptoken'> /// Page continuation token is only used if a previous operation returned a /// partial result. /// If a previous response contains a nextLink element, the value of the /// nextLink element will include a token parameter that specifies a starting /// point to use for subsequent calls. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ManagementGroupInfo> > ListAsync(this IManagementGroupsOperations operations, string cacheControl = "no-cache", string skiptoken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(cacheControl, skiptoken, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of management groups connected to a workspace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <ManagementGroup> > ListAsync(this IManagementGroupsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }