File - Delete From Compute Node
从计算节点中删除指定文件。
DELETE {batchUrl}/pools/{poolId}/nodes/{nodeId}/files/{filePath}?api-version=2024-07-01.20.0
DELETE {batchUrl}/pools/{poolId}/nodes/{nodeId}/files/{filePath}?recursive={recursive}&timeout={timeout}&api-version=2024-07-01.20.0
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
batch
|
path | True |
string |
所有 Azure Batch 服务请求的基本 URL。 |
file
|
path | True |
string |
要删除的文件或目录的路径。 |
node
|
path | True |
string |
要从中删除文件的计算节点的 ID。 |
pool
|
path | True |
string |
包含计算节点的池的 ID。 |
api-version
|
query | True |
string |
客户端 API 版本。 |
recursive
|
query |
boolean |
是否删除目录的子级。 如果 filePath 参数表示目录而不是文件,则可以将递归设置为 true 以删除目录及其中的所有文件和子目录。 如果递归为 false,则目录必须为空或删除将失败。 |
|
timeout
|
query |
integer (int32) |
服务器处理请求的最长时间(以秒为单位)。 默认值为 30 秒。 如果该值大于 30,则改用默认值。 |
请求头
Media Types: "application/json; odata=minimalmetadata"
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
client-request-id |
string (uuid) |
调用方生成的请求标识,采用不带大括号的 GUID 形式,例如 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0。 |
|
return-client-request-id |
boolean |
服务器是否应在响应中返回 client-request-id。 |
|
ocp-date |
string (date-time-rfc1123) |
发出请求的时间。 客户端库通常将此设置为当前的系统时钟时间;如果直接调用 REST API,请显式设置它。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
对 Batch 服务的请求成功。 标头
|
|
Other Status Codes |
Batch 服务中的错误。 |
安全性
azure_auth
Microsoft Entra OAuth 2.0 身份验证代码流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
Authorization
类型:
apiKey
在:
header
示例
File delete from node
示例请求
DELETE account.region.batch.azure.com/pools/poolId/nodes/tvm-1695681911_1-20161122t193202z/files/workitems\jobId\job-1\task1\wd\testFile.txt?recursive=False&api-version=2024-07-01.20.0
示例响应
定义
名称 | 说明 |
---|---|
Batch |
从 Azure Batch 服务收到的错误响应。 |
Batch |
Azure Batch 错误响应中包含的附加信息项。 |
Error |
Azure Batch 错误响应中收到的错误消息。 |
BatchError
从 Azure Batch 服务收到的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
message |
描述错误的消息,旨在适合在用户界面中显示。 |
|
values |
包含有关错误的更多详细信息的键值对的集合。 |
BatchErrorDetail
Azure Batch 错误响应中包含的附加信息项。
名称 | 类型 | 说明 |
---|---|---|
key |
string |
指定 Value 属性含义的标识符。 |
value |
string |
错误响应附带的其他信息。 |
ErrorMessage
Azure Batch 错误响应中收到的错误消息。
名称 | 类型 | 说明 |
---|---|---|
lang |
string |
错误消息的语言代码 |
value |
string |
消息的文本。 |