/// <summary> /// Gets the hierarchy settings defined at the Management Group level. Settings /// can only be set on the root Management Group of the hierarchy. /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// Management Group ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <HierarchySettings> GetAsync(this IHierarchySettingsOperations operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates the hierarchy settings defined at the Management Group level. /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// Management Group ID. /// </param> /// <param name='createTenantSettingsRequest'> /// Tenant level settings request parameter. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <HierarchySettings> UpdateAsync(this IHierarchySettingsOperations operations, string groupId, CreateOrUpdateSettingsRequest createTenantSettingsRequest, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(groupId, createTenantSettingsRequest, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the hierarchy settings defined at the Management Group level. Settings /// can only be set on the root Management Group of the hierarchy. /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// Management Group ID. /// </param> public static HierarchySettings Get(this IHierarchySettingsOperations operations, string groupId) { return(operations.GetAsync(groupId).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the hierarchy settings defined at the Management Group level. /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// Management Group ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IHierarchySettingsOperations operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the hierarchy settings defined at the Management Group level. /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// Management Group ID. /// </param> public static void Delete(this IHierarchySettingsOperations operations, string groupId) { operations.DeleteAsync(groupId).GetAwaiter().GetResult(); }
/// <summary> /// Updates the hierarchy settings defined at the Management Group level. /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// Management Group ID. /// </param> /// <param name='createTenantSettingsRequest'> /// Tenant level settings request parameter. /// </param> public static HierarchySettings Update(this IHierarchySettingsOperations operations, string groupId, CreateOrUpdateSettingsRequest createTenantSettingsRequest) { return(operations.UpdateAsync(groupId, createTenantSettingsRequest).GetAwaiter().GetResult()); }