你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

PoolOperations.GetRDPFileAsync 方法

定义

重载

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

获取指定节点的远程桌面协议 (RDP) 文件。

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

获取指定节点的远程桌面协议文件。

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

Source:
PoolOperations.cs

获取指定节点的远程桌面协议 (RDP) 文件。

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

参数

poolId
String

包含计算节点的池的 ID。

computeNodeId
String

要为其获取远程桌面文件的计算节点的 ID。

rdpStream
Stream

Stream RDP 文件内容写入其中的 。

additionalBehaviors
IEnumerable<BatchClientBehavior>

应用于 之后的 Batch 服务请求的实例集合BatchClientBehaviorCustomBehaviors

cancellationToken
CancellationToken

一个 CancellationToken ,用于控制异步操作的生存期。

返回

表示异步操作的 Task

注解

此方法不会关闭 rdpStream 流,也不会在写入后重置位置。 调用方负责关闭流,或根据需要重置位置。

获取 RDP 文件操作以异步方式运行。

仅当使用 属性创建 CloudServiceConfiguration 池时,才能调用此方法。 如果在使用 VirtualMachineConfiguration创建的池上调用此方法,则 Batch 服务将返回 409 (冲突) 。 对于具有 VirtualMachineConfiguration 属性的池,必须使用新方法 GetRemoteLoginSettings(String, String, IEnumerable<BatchClientBehavior>)

适用于

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

Source:
PoolOperations.cs

获取指定节点的远程桌面协议文件。

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

参数

poolId
String

包含计算节点的池的 ID。

computeNodeId
String

要为其获取远程桌面文件的计算节点的 ID。

rdpFileNameToCreate
String

创建 RDP 文件的文件路径。

additionalBehaviors
IEnumerable<BatchClientBehavior>

应用于 之后的 Batch 服务请求的实例集合BatchClientBehaviorCustomBehaviors

cancellationToken
CancellationToken

一个 CancellationToken ,用于控制异步操作的生存期。

返回

表示异步操作的 Task

注解

如果 指定的 rdpFileNameToCreate 文件已存在,则会覆盖该文件。

获取 RDP 文件操作以异步方式运行。

仅当使用 属性创建 CloudServiceConfiguration 池时,才能调用此方法。 如果在使用 VirtualMachineConfiguration创建的池上调用此方法,则 Batch 服务将返回 409 (冲突) 。 对于具有 VirtualMachineConfiguration 属性的池,必须使用新方法 GetRemoteLoginSettingsAsync(String, String, IEnumerable<BatchClientBehavior>, CancellationToken)

适用于