1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. getActiveSessions
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v2.82.0 published on Friday, Jan 10, 2025 by Pulumi

azure-native.network.getActiveSessions

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v2.82.0 published on Friday, Jan 10, 2025 by Pulumi

Returns the list of currently active sessions on the Bastion. Azure REST API version: 2023-02-01.

Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.

Using getActiveSessions

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getActiveSessions(args: GetActiveSessionsArgs, opts?: InvokeOptions): Promise<GetActiveSessionsResult>
function getActiveSessionsOutput(args: GetActiveSessionsOutputArgs, opts?: InvokeOptions): Output<GetActiveSessionsResult>
Copy
def get_active_sessions(bastion_host_name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetActiveSessionsResult
def get_active_sessions_output(bastion_host_name: Optional[pulumi.Input[str]] = None,
                        resource_group_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetActiveSessionsResult]
Copy
func GetActiveSessions(ctx *Context, args *GetActiveSessionsArgs, opts ...InvokeOption) (*GetActiveSessionsResult, error)
func GetActiveSessionsOutput(ctx *Context, args *GetActiveSessionsOutputArgs, opts ...InvokeOption) GetActiveSessionsResultOutput
Copy

> Note: This function is named GetActiveSessions in the Go SDK.

public static class GetActiveSessions 
{
    public static Task<GetActiveSessionsResult> InvokeAsync(GetActiveSessionsArgs args, InvokeOptions? opts = null)
    public static Output<GetActiveSessionsResult> Invoke(GetActiveSessionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetActiveSessionsResult> getActiveSessions(GetActiveSessionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Copy
fn::invoke:
  function: azure-native:network:getActiveSessions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BastionHostName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Bastion Host.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
BastionHostName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Bastion Host.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
bastionHostName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Bastion Host.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
bastionHostName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Bastion Host.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
bastion_host_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Bastion Host.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
bastionHostName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Bastion Host.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.

getActiveSessions Result

The following output properties are available:

NextLink string
The URL to get the next set of results.
Value List<Pulumi.AzureNative.Network.Outputs.BastionActiveSessionResponse>
List of active sessions on the bastion.
NextLink string
The URL to get the next set of results.
Value []BastionActiveSessionResponse
List of active sessions on the bastion.
nextLink String
The URL to get the next set of results.
value List<BastionActiveSessionResponse>
List of active sessions on the bastion.
nextLink string
The URL to get the next set of results.
value BastionActiveSessionResponse[]
List of active sessions on the bastion.
next_link str
The URL to get the next set of results.
value Sequence[BastionActiveSessionResponse]
List of active sessions on the bastion.
nextLink String
The URL to get the next set of results.
value List<Property Map>
List of active sessions on the bastion.

Supporting Types

BastionActiveSessionResponse

Protocol This property is required. string
The protocol used to connect to the target.
ResourceType This property is required. string
The type of the resource.
SessionDurationInMins This property is required. double
Duration in mins the session has been active.
SessionId This property is required. string
A unique id for the session.
StartTime This property is required. object
The time when the session started.
TargetHostName This property is required. string
The host name of the target.
TargetIpAddress This property is required. string
The IP Address of the target.
TargetResourceGroup This property is required. string
The resource group of the target.
TargetResourceId This property is required. string
The resource id of the target.
TargetSubscriptionId This property is required. string
The subscription id for the target virtual machine.
UserName This property is required. string
The user name who is active on this session.
Protocol This property is required. string
The protocol used to connect to the target.
ResourceType This property is required. string
The type of the resource.
SessionDurationInMins This property is required. float64
Duration in mins the session has been active.
SessionId This property is required. string
A unique id for the session.
StartTime This property is required. interface{}
The time when the session started.
TargetHostName This property is required. string
The host name of the target.
TargetIpAddress This property is required. string
The IP Address of the target.
TargetResourceGroup This property is required. string
The resource group of the target.
TargetResourceId This property is required. string
The resource id of the target.
TargetSubscriptionId This property is required. string
The subscription id for the target virtual machine.
UserName This property is required. string
The user name who is active on this session.
protocol This property is required. String
The protocol used to connect to the target.
resourceType This property is required. String
The type of the resource.
sessionDurationInMins This property is required. Double
Duration in mins the session has been active.
sessionId This property is required. String
A unique id for the session.
startTime This property is required. Object
The time when the session started.
targetHostName This property is required. String
The host name of the target.
targetIpAddress This property is required. String
The IP Address of the target.
targetResourceGroup This property is required. String
The resource group of the target.
targetResourceId This property is required. String
The resource id of the target.
targetSubscriptionId This property is required. String
The subscription id for the target virtual machine.
userName This property is required. String
The user name who is active on this session.
protocol This property is required. string
The protocol used to connect to the target.
resourceType This property is required. string
The type of the resource.
sessionDurationInMins This property is required. number
Duration in mins the session has been active.
sessionId This property is required. string
A unique id for the session.
startTime This property is required. any
The time when the session started.
targetHostName This property is required. string
The host name of the target.
targetIpAddress This property is required. string
The IP Address of the target.
targetResourceGroup This property is required. string
The resource group of the target.
targetResourceId This property is required. string
The resource id of the target.
targetSubscriptionId This property is required. string
The subscription id for the target virtual machine.
userName This property is required. string
The user name who is active on this session.
protocol This property is required. str
The protocol used to connect to the target.
resource_type This property is required. str
The type of the resource.
session_duration_in_mins This property is required. float
Duration in mins the session has been active.
session_id This property is required. str
A unique id for the session.
start_time This property is required. Any
The time when the session started.
target_host_name This property is required. str
The host name of the target.
target_ip_address This property is required. str
The IP Address of the target.
target_resource_group This property is required. str
The resource group of the target.
target_resource_id This property is required. str
The resource id of the target.
target_subscription_id This property is required. str
The subscription id for the target virtual machine.
user_name This property is required. str
The user name who is active on this session.
protocol This property is required. String
The protocol used to connect to the target.
resourceType This property is required. String
The type of the resource.
sessionDurationInMins This property is required. Number
Duration in mins the session has been active.
sessionId This property is required. String
A unique id for the session.
startTime This property is required. Any
The time when the session started.
targetHostName This property is required. String
The host name of the target.
targetIpAddress This property is required. String
The IP Address of the target.
targetResourceGroup This property is required. String
The resource group of the target.
targetResourceId This property is required. String
The resource id of the target.
targetSubscriptionId This property is required. String
The subscription id for the target virtual machine.
userName This property is required. String
The user name who is active on this session.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v2.82.0 published on Friday, Jan 10, 2025 by Pulumi