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

ComputeNodeOperations class

表示 ComputeNodeOperations 的类。

构造函数

ComputeNodeOperations(BatchServiceClientContext)

创建 ComputeNodeOperations。

方法

addUser(string, string, ComputeNodeUser, ComputeNodeAddUserOptionalParams)

仅当计算节点处于空闲或运行状态时,才能将用户帐户添加到计算节点。

addUser(string, string, ComputeNodeUser, ComputeNodeAddUserOptionalParams, ServiceCallback<void>)
addUser(string, string, ComputeNodeUser, ServiceCallback<void>)
deleteUser(string, string, string, ComputeNodeDeleteUserOptionalParams)

仅当计算节点处于空闲或运行状态时,才能将其删除。

deleteUser(string, string, string, ComputeNodeDeleteUserOptionalParams, ServiceCallback<void>)
deleteUser(string, string, string, ServiceCallback<void>)
disableScheduling(string, string, ComputeNodeDisableSchedulingOptionalParams)

仅当计算节点上的任务计划状态已启用时,才能禁用其当前计划状态。

disableScheduling(string, string, ComputeNodeDisableSchedulingOptionalParams, ServiceCallback<void>)
disableScheduling(string, string, ServiceCallback<void>)
enableScheduling(string, string, ComputeNodeEnableSchedulingOptionalParams)

仅当计算节点上的任务计划状态处于禁用状态时,才能在计算节点上启用任务计划

enableScheduling(string, string, ComputeNodeEnableSchedulingOptionalParams, ServiceCallback<void>)
enableScheduling(string, string, ServiceCallback<void>)
get(string, string, ComputeNodeGetOptionalParams)
get(string, string, ComputeNodeGetOptionalParams, ServiceCallback<ComputeNode>)
get(string, string, ServiceCallback<ComputeNode>)
getRemoteDesktop(string, string, ComputeNodeGetRemoteDesktopOptionalParams)

必须先在计算节点上创建用户帐户,然后才能使用 RDP 文件访问计算节点。 只能在使用云服务配置创建的池上调用此 API。 有关使用虚拟机配置创建的池,请参阅 GetRemoteLoginSettings API。

getRemoteDesktop(string, string, ComputeNodeGetRemoteDesktopOptionalParams, ServiceCallback<void>)
getRemoteDesktop(string, string, ServiceCallback<void>)
getRemoteLoginSettings(string, string, ComputeNodeGetRemoteLoginSettingsOptionalParams)

必须先在计算节点上创建用户帐户,然后才能使用远程登录设置远程登录到计算节点。 只能在使用虚拟机配置属性创建的池上调用此 API。 有关使用云服务配置创建的池,请参阅 GetRemoteDesktop API。

getRemoteLoginSettings(string, string, ComputeNodeGetRemoteLoginSettingsOptionalParams, ServiceCallback<ComputeNodeGetRemoteLoginSettingsResult>)
getRemoteLoginSettings(string, string, ServiceCallback<ComputeNodeGetRemoteLoginSettingsResult>)
list(string, ComputeNodeListOptionalParams)
list(string, ComputeNodeListOptionalParams, ServiceCallback<ComputeNodeListResult>)
list(string, ServiceCallback<ComputeNodeListResult>)
listNext(string, ComputeNodeListNextOptionalParams)
listNext(string, ComputeNodeListNextOptionalParams, ServiceCallback<ComputeNodeListResult>)
listNext(string, ServiceCallback<ComputeNodeListResult>)
reboot(string, string, ComputeNodeRebootOptionalParams)

仅当计算节点处于空闲或正在运行状态时,才能重启该节点。

reboot(string, string, ComputeNodeRebootOptionalParams, ServiceCallback<void>)
reboot(string, string, ServiceCallback<void>)
reimage(string, string, ComputeNodeReimageOptionalParams)

仅当计算节点上处于空闲或正在运行状态时,才能在计算节点上重新安装操作系统。 只能在使用云服务配置属性创建的池上调用此 API。

reimage(string, string, ComputeNodeReimageOptionalParams, ServiceCallback<void>)
reimage(string, string, ServiceCallback<void>)
updateUser(string, string, string, NodeUpdateUserParameter, ComputeNodeUpdateUserOptionalParams)

此操作将替换帐户的所有可更新属性。 例如,如果未指定 expiryTime 元素,则当前值将替换为默认值,而不是保持未修改状态。 仅当计算节点上的用户帐户处于空闲或运行状态时,才能更新该节点上的用户帐户。

updateUser(string, string, string, NodeUpdateUserParameter, ComputeNodeUpdateUserOptionalParams, ServiceCallback<void>)
updateUser(string, string, string, NodeUpdateUserParameter, ServiceCallback<void>)
uploadBatchServiceLogs(string, string, UploadBatchServiceLogsConfiguration, ComputeNodeUploadBatchServiceLogsOptionalParams)

如果遇到错误并希望升级到Azure 支持,这是为了自动从计算节点收集Azure Batch服务日志文件。 应与 Azure 支持 共享Azure Batch服务日志文件,以帮助调试 Batch 服务的问题。

uploadBatchServiceLogs(string, string, UploadBatchServiceLogsConfiguration, ComputeNodeUploadBatchServiceLogsOptionalParams, ServiceCallback<UploadBatchServiceLogsResult>)
uploadBatchServiceLogs(string, string, UploadBatchServiceLogsConfiguration, ServiceCallback<UploadBatchServiceLogsResult>)

构造函数详细信息

ComputeNodeOperations(BatchServiceClientContext)

创建 ComputeNodeOperations。

new ComputeNodeOperations(client: BatchServiceClientContext)

参数

client
BatchServiceClientContext

对服务客户端的引用。

方法详细信息

addUser(string, string, ComputeNodeUser, ComputeNodeAddUserOptionalParams)

仅当计算节点处于空闲或运行状态时,才能将用户帐户添加到计算节点。

function addUser(poolId: string, nodeId: string, user: ComputeNodeUser, options?: ComputeNodeAddUserOptionalParams): Promise<ComputeNodeAddUserResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要在其中创建用户帐户的计算机的 ID。

user
ComputeNodeUser

要创建的用户帐户。

options
ComputeNodeAddUserOptionalParams

可选参数

返回

Promise<Models.ComputeNodeAddUserResponse>

addUser(string, string, ComputeNodeUser, ComputeNodeAddUserOptionalParams, ServiceCallback<void>)

function addUser(poolId: string, nodeId: string, user: ComputeNodeUser, options: ComputeNodeAddUserOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要在其中创建用户帐户的计算机的 ID。

user
ComputeNodeUser

要创建的用户帐户。

options
ComputeNodeAddUserOptionalParams

可选参数

callback

ServiceCallback<void>

回调

addUser(string, string, ComputeNodeUser, ServiceCallback<void>)

function addUser(poolId: string, nodeId: string, user: ComputeNodeUser, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要在其中创建用户帐户的计算机的 ID。

user
ComputeNodeUser

要创建的用户帐户。

callback

ServiceCallback<void>

回调

deleteUser(string, string, string, ComputeNodeDeleteUserOptionalParams)

仅当计算节点处于空闲或运行状态时,才能将其删除。

function deleteUser(poolId: string, nodeId: string, userName: string, options?: ComputeNodeDeleteUserOptionalParams): Promise<ComputeNodeDeleteUserResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要删除用户帐户的计算机的 ID。

userName

string

要删除的用户帐户的名称。

返回

Promise<Models.ComputeNodeDeleteUserResponse>

deleteUser(string, string, string, ComputeNodeDeleteUserOptionalParams, ServiceCallback<void>)

function deleteUser(poolId: string, nodeId: string, userName: string, options: ComputeNodeDeleteUserOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要删除用户帐户的计算机的 ID。

userName

string

要删除的用户帐户的名称。

callback

ServiceCallback<void>

回调

deleteUser(string, string, string, ServiceCallback<void>)

function deleteUser(poolId: string, nodeId: string, userName: string, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要删除用户帐户的计算机的 ID。

userName

string

要删除的用户帐户的名称。

callback

ServiceCallback<void>

回调

disableScheduling(string, string, ComputeNodeDisableSchedulingOptionalParams)

仅当计算节点上的任务计划状态已启用时,才能禁用其当前计划状态。

function disableScheduling(poolId: string, nodeId: string, options?: ComputeNodeDisableSchedulingOptionalParams): Promise<ComputeNodeDisableSchedulingResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要禁用任务计划的计算节点的 ID。

返回

Promise<Models.ComputeNodeDisableSchedulingResponse>

disableScheduling(string, string, ComputeNodeDisableSchedulingOptionalParams, ServiceCallback<void>)

function disableScheduling(poolId: string, nodeId: string, options: ComputeNodeDisableSchedulingOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要禁用任务计划的计算节点的 ID。

callback

ServiceCallback<void>

回调

disableScheduling(string, string, ServiceCallback<void>)

function disableScheduling(poolId: string, nodeId: string, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要禁用任务计划的计算节点的 ID。

callback

ServiceCallback<void>

回调

enableScheduling(string, string, ComputeNodeEnableSchedulingOptionalParams)

仅当计算节点上的任务计划状态处于禁用状态时,才能在计算节点上启用任务计划

function enableScheduling(poolId: string, nodeId: string, options?: ComputeNodeEnableSchedulingOptionalParams): Promise<ComputeNodeEnableSchedulingResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要启用任务计划的计算节点的 ID。

返回

Promise<Models.ComputeNodeEnableSchedulingResponse>

enableScheduling(string, string, ComputeNodeEnableSchedulingOptionalParams, ServiceCallback<void>)

function enableScheduling(poolId: string, nodeId: string, options: ComputeNodeEnableSchedulingOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要启用任务计划的计算节点的 ID。

callback

ServiceCallback<void>

回调

enableScheduling(string, string, ServiceCallback<void>)

function enableScheduling(poolId: string, nodeId: string, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要启用任务计划的计算节点的 ID。

callback

ServiceCallback<void>

回调

get(string, string, ComputeNodeGetOptionalParams)

function get(poolId: string, nodeId: string, options?: ComputeNodeGetOptionalParams): Promise<ComputeNodeGetResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要获取相关信息的计算节点的 ID。

options
ComputeNodeGetOptionalParams

可选参数

返回

Promise<Models.ComputeNodeGetResponse>

get(string, string, ComputeNodeGetOptionalParams, ServiceCallback<ComputeNode>)

function get(poolId: string, nodeId: string, options: ComputeNodeGetOptionalParams, callback: ServiceCallback<ComputeNode>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要获取相关信息的计算节点的 ID。

options
ComputeNodeGetOptionalParams

可选参数

callback

ServiceCallback<ComputeNode>

回调

get(string, string, ServiceCallback<ComputeNode>)

function get(poolId: string, nodeId: string, callback: ServiceCallback<ComputeNode>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要获取相关信息的计算节点的 ID。

callback

ServiceCallback<ComputeNode>

回调

getRemoteDesktop(string, string, ComputeNodeGetRemoteDesktopOptionalParams)

必须先在计算节点上创建用户帐户,然后才能使用 RDP 文件访问计算节点。 只能在使用云服务配置创建的池上调用此 API。 有关使用虚拟机配置创建的池,请参阅 GetRemoteLoginSettings API。

function getRemoteDesktop(poolId: string, nodeId: string, options?: ComputeNodeGetRemoteDesktopOptionalParams): Promise<ComputeNodeGetRemoteDesktopResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

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

返回

Promise<Models.ComputeNodeGetRemoteDesktopResponse>

getRemoteDesktop(string, string, ComputeNodeGetRemoteDesktopOptionalParams, ServiceCallback<void>)

function getRemoteDesktop(poolId: string, nodeId: string, options: ComputeNodeGetRemoteDesktopOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

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

callback

ServiceCallback<void>

回调

getRemoteDesktop(string, string, ServiceCallback<void>)

function getRemoteDesktop(poolId: string, nodeId: string, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

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

callback

ServiceCallback<void>

回调

getRemoteLoginSettings(string, string, ComputeNodeGetRemoteLoginSettingsOptionalParams)

必须先在计算节点上创建用户帐户,然后才能使用远程登录设置远程登录到计算节点。 只能在使用虚拟机配置属性创建的池上调用此 API。 有关使用云服务配置创建的池,请参阅 GetRemoteDesktop API。

function getRemoteLoginSettings(poolId: string, nodeId: string, options?: ComputeNodeGetRemoteLoginSettingsOptionalParams): Promise<ComputeNodeGetRemoteLoginSettingsResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要为其获取远程登录设置的计算节点的 ID。

返回

Promise<Models.ComputeNodeGetRemoteLoginSettingsResponse>

getRemoteLoginSettings(string, string, ComputeNodeGetRemoteLoginSettingsOptionalParams, ServiceCallback<ComputeNodeGetRemoteLoginSettingsResult>)

function getRemoteLoginSettings(poolId: string, nodeId: string, options: ComputeNodeGetRemoteLoginSettingsOptionalParams, callback: ServiceCallback<ComputeNodeGetRemoteLoginSettingsResult>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要为其获取远程登录设置的计算节点的 ID。

getRemoteLoginSettings(string, string, ServiceCallback<ComputeNodeGetRemoteLoginSettingsResult>)

function getRemoteLoginSettings(poolId: string, nodeId: string, callback: ServiceCallback<ComputeNodeGetRemoteLoginSettingsResult>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要为其获取远程登录设置的计算节点的 ID。

list(string, ComputeNodeListOptionalParams)

function list(poolId: string, options?: ComputeNodeListOptionalParams): Promise<ComputeNodeListResponse>

参数

poolId

string

要从中列出计算节点的池的 ID。

options
ComputeNodeListOptionalParams

可选参数

返回

Promise<Models.ComputeNodeListResponse>

list(string, ComputeNodeListOptionalParams, ServiceCallback<ComputeNodeListResult>)

function list(poolId: string, options: ComputeNodeListOptionalParams, callback: ServiceCallback<ComputeNodeListResult>)

参数

poolId

string

要从中列出计算节点的池的 ID。

options
ComputeNodeListOptionalParams

可选参数

list(string, ServiceCallback<ComputeNodeListResult>)

function list(poolId: string, callback: ServiceCallback<ComputeNodeListResult>)

参数

poolId

string

要从中列出计算节点的池的 ID。

listNext(string, ComputeNodeListNextOptionalParams)

function listNext(nextPageLink: string, options?: ComputeNodeListNextOptionalParams): Promise<ComputeNodeListResponse>

参数

nextPageLink

string

上一次成功调用 List 操作的 NextLink。

options
ComputeNodeListNextOptionalParams

可选参数

返回

Promise<Models.ComputeNodeListResponse>

listNext(string, ComputeNodeListNextOptionalParams, ServiceCallback<ComputeNodeListResult>)

function listNext(nextPageLink: string, options: ComputeNodeListNextOptionalParams, callback: ServiceCallback<ComputeNodeListResult>)

参数

nextPageLink

string

上一次成功调用 List 操作的 NextLink。

options
ComputeNodeListNextOptionalParams

可选参数

listNext(string, ServiceCallback<ComputeNodeListResult>)

function listNext(nextPageLink: string, callback: ServiceCallback<ComputeNodeListResult>)

参数

nextPageLink

string

上一次成功调用 List 操作的 NextLink。

reboot(string, string, ComputeNodeRebootOptionalParams)

仅当计算节点处于空闲或正在运行状态时,才能重启该节点。

function reboot(poolId: string, nodeId: string, options?: ComputeNodeRebootOptionalParams): Promise<ComputeNodeRebootResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要重启的计算节点的 ID。

options
ComputeNodeRebootOptionalParams

可选参数

返回

Promise<Models.ComputeNodeRebootResponse>

reboot(string, string, ComputeNodeRebootOptionalParams, ServiceCallback<void>)

function reboot(poolId: string, nodeId: string, options: ComputeNodeRebootOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要重启的计算节点的 ID。

options
ComputeNodeRebootOptionalParams

可选参数

callback

ServiceCallback<void>

回调

reboot(string, string, ServiceCallback<void>)

function reboot(poolId: string, nodeId: string, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要重启的计算节点的 ID。

callback

ServiceCallback<void>

回调

reimage(string, string, ComputeNodeReimageOptionalParams)

仅当计算节点上处于空闲或正在运行状态时,才能在计算节点上重新安装操作系统。 只能在使用云服务配置属性创建的池上调用此 API。

function reimage(poolId: string, nodeId: string, options?: ComputeNodeReimageOptionalParams): Promise<ComputeNodeReimageResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要重启的计算节点的 ID。

options
ComputeNodeReimageOptionalParams

可选参数

返回

Promise<Models.ComputeNodeReimageResponse>

reimage(string, string, ComputeNodeReimageOptionalParams, ServiceCallback<void>)

function reimage(poolId: string, nodeId: string, options: ComputeNodeReimageOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要重启的计算节点的 ID。

options
ComputeNodeReimageOptionalParams

可选参数

callback

ServiceCallback<void>

回调

reimage(string, string, ServiceCallback<void>)

function reimage(poolId: string, nodeId: string, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要重启的计算节点的 ID。

callback

ServiceCallback<void>

回调

updateUser(string, string, string, NodeUpdateUserParameter, ComputeNodeUpdateUserOptionalParams)

此操作将替换帐户的所有可更新属性。 例如,如果未指定 expiryTime 元素,则当前值将替换为默认值,而不是保持未修改状态。 仅当计算节点上的用户帐户处于空闲或运行状态时,才能更新该节点上的用户帐户。

function updateUser(poolId: string, nodeId: string, userName: string, nodeUpdateUserParameter: NodeUpdateUserParameter, options?: ComputeNodeUpdateUserOptionalParams): Promise<ComputeNodeUpdateUserResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要更新用户帐户的计算机的 ID。

userName

string

要更新的用户帐户的名称。

nodeUpdateUserParameter
NodeUpdateUserParameter

请求的参数。

返回

Promise<Models.ComputeNodeUpdateUserResponse>

updateUser(string, string, string, NodeUpdateUserParameter, ComputeNodeUpdateUserOptionalParams, ServiceCallback<void>)

function updateUser(poolId: string, nodeId: string, userName: string, nodeUpdateUserParameter: NodeUpdateUserParameter, options: ComputeNodeUpdateUserOptionalParams, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要更新用户帐户的计算机的 ID。

userName

string

要更新的用户帐户的名称。

nodeUpdateUserParameter
NodeUpdateUserParameter

请求的参数。

callback

ServiceCallback<void>

回调

updateUser(string, string, string, NodeUpdateUserParameter, ServiceCallback<void>)

function updateUser(poolId: string, nodeId: string, userName: string, nodeUpdateUserParameter: NodeUpdateUserParameter, callback: ServiceCallback<void>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要更新用户帐户的计算机的 ID。

userName

string

要更新的用户帐户的名称。

nodeUpdateUserParameter
NodeUpdateUserParameter

请求的参数。

callback

ServiceCallback<void>

回调

uploadBatchServiceLogs(string, string, UploadBatchServiceLogsConfiguration, ComputeNodeUploadBatchServiceLogsOptionalParams)

如果遇到错误并希望升级到Azure 支持,这是为了自动从计算节点收集Azure Batch服务日志文件。 应与 Azure 支持 共享Azure Batch服务日志文件,以帮助调试 Batch 服务的问题。

function uploadBatchServiceLogs(poolId: string, nodeId: string, uploadBatchServiceLogsConfiguration: UploadBatchServiceLogsConfiguration, options?: ComputeNodeUploadBatchServiceLogsOptionalParams): Promise<ComputeNodeUploadBatchServiceLogsResponse>

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要从中上传Azure Batch服务日志文件的计算节点的 ID。

uploadBatchServiceLogsConfiguration
UploadBatchServiceLogsConfiguration

Azure Batch服务日志文件上传配置。

返回

Promise<Models.ComputeNodeUploadBatchServiceLogsResponse>

uploadBatchServiceLogs(string, string, UploadBatchServiceLogsConfiguration, ComputeNodeUploadBatchServiceLogsOptionalParams, ServiceCallback<UploadBatchServiceLogsResult>)

function uploadBatchServiceLogs(poolId: string, nodeId: string, uploadBatchServiceLogsConfiguration: UploadBatchServiceLogsConfiguration, options: ComputeNodeUploadBatchServiceLogsOptionalParams, callback: ServiceCallback<UploadBatchServiceLogsResult>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要从中上传Azure Batch服务日志文件的计算节点的 ID。

uploadBatchServiceLogsConfiguration
UploadBatchServiceLogsConfiguration

Azure Batch服务日志文件上传配置。

uploadBatchServiceLogs(string, string, UploadBatchServiceLogsConfiguration, ServiceCallback<UploadBatchServiceLogsResult>)

function uploadBatchServiceLogs(poolId: string, nodeId: string, uploadBatchServiceLogsConfiguration: UploadBatchServiceLogsConfiguration, callback: ServiceCallback<UploadBatchServiceLogsResult>)

参数

poolId

string

包含计算节点的池的 ID。

nodeId

string

要从中上传Azure Batch服务日志文件的计算节点的 ID。

uploadBatchServiceLogsConfiguration
UploadBatchServiceLogsConfiguration

Azure Batch服务日志文件上传配置。