PoolOperations.GetRDPFileAsync Method

Definition

Overloads

GetRDPFileAsync(String, String, Stream, IEnumerable<BatchClientBehavior>, CancellationToken)

Gets a Remote Desktop Protocol (RDP) file for the specified node.

GetRDPFileAsync(String, String, String, IEnumerable<BatchClientBehavior>, CancellationToken)

Gets a Remote Desktop Protocol file for the specified node.

GetRDPFileAsync(String, String, Stream, IEnumerable<BatchClientBehavior>, CancellationToken)

Source:
PoolOperations.cs

Gets a Remote Desktop Protocol (RDP) file for the specified node.

public System.Threading.Tasks.Task GetRDPFileAsync (string poolId, string computeNodeId, System.IO.Stream rdpStream, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.GetRDPFileAsync : string * string * System.IO.Stream * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function GetRDPFileAsync (poolId As String, computeNodeId As String, rdpStream As Stream, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

poolId
String

The id of the pool that contains the compute node.

computeNodeId
String

The id of the compute node for which to get a Remote Desktop file.

rdpStream
Stream

The Stream into which the RDP file contents will be written.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

A Task that represents the asynchronous operation.

Remarks

This method does not close the rdpStream stream, and it does not reset the position after writing. It is the caller's responsibility to close the stream, or to reset the position if required.

The get RDP file operation runs asynchronously.

This method can be invoked only if the pool is created with a CloudServiceConfiguration property. If this method is invoked on pools created with VirtualMachineConfiguration, then Batch service returns 409 (Conflict). For pools with VirtualMachineConfiguration property, the new method GetRemoteLoginSettings(String, String, IEnumerable<BatchClientBehavior>) must be used.

Applies to

GetRDPFileAsync(String, String, String, IEnumerable<BatchClientBehavior>, CancellationToken)

Source:
PoolOperations.cs

Gets a Remote Desktop Protocol file for the specified node.

public System.Threading.Tasks.Task GetRDPFileAsync (string poolId, string computeNodeId, string rdpFileNameToCreate, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.GetRDPFileAsync : string * string * string * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function GetRDPFileAsync (poolId As String, computeNodeId As String, rdpFileNameToCreate As String, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

poolId
String

The id of the pool that contains the compute node.

computeNodeId
String

The id of the compute node for which to get a Remote Desktop file.

rdpFileNameToCreate
String

The file path at which to create the RDP file.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

A Task that represents the asynchronous operation.

Remarks

If the file specified by rdpFileNameToCreate already exists, it is overwritten.

The get RDP file operation runs asynchronously.

This method can be invoked only if the pool is created with a CloudServiceConfiguration property. If this method is invoked on pools created with VirtualMachineConfiguration, then Batch service returns 409 (Conflict). For pools with VirtualMachineConfiguration property, the new method GetRemoteLoginSettingsAsync(String, String, IEnumerable<BatchClientBehavior>, CancellationToken) must be used.

Applies to