BastionHostResource.DisconnectActiveSessionsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the list of currently active sessions on the Bastion.
- Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions.
- Operation Id. : BastionHosts_DisconnectActiveSessions.
- Default Api Version. : 2025-07-01.
- Resource. : BastionHostResource.
public virtual Azure.AsyncPageable<Azure.ResourceManager.Network.Models.BastionSessionState> DisconnectActiveSessionsAsync(Azure.ResourceManager.Network.Models.SessionIds sessionIds, System.Threading.CancellationToken cancellationToken = default);
abstract member DisconnectActiveSessionsAsync : Azure.ResourceManager.Network.Models.SessionIds * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Network.Models.BastionSessionState>
override this.DisconnectActiveSessionsAsync : Azure.ResourceManager.Network.Models.SessionIds * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Network.Models.BastionSessionState>
Public Overridable Function DisconnectActiveSessionsAsync (sessionIds As SessionIds, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of BastionSessionState)
Parameters
- sessionIds
- SessionIds
The list of sessionids to disconnect.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
A collection of BastionSessionState that may take multiple service requests to iterate over.
Exceptions
sessionIds is null.