-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cadl
More file actions
153 lines (126 loc) · 4.58 KB
/
main.cadl
File metadata and controls
153 lines (126 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import "@cadl-lang/rest";
import "@cadl-lang/versioning";
import "@azure-tools/cadl-azure-core";
import "@azure-tools/cadl-dpg";
using Cadl.Reflection;
using Cadl.Http;
using Cadl.Rest;
using Cadl.Versioning;
using Azure.Core;
using Azure.DPG;
@service({
title: "BatchServiceClient",
version: "2022-10-01.16.0",
})
@versioned(BatchService.Versions)
@versionedDependency([[BatchService.Versions.v2022_10_01, Azure.Core.Versions.v1_0_Preview_2]])
@doc("A client for issuing REST requests to the Azure Batch service.")
namespace BatchService;
enum Versions {
v2022_10_01: "2022-10-01.16.0",
}
@operationGroup
@tag("Files")
interface File {
@doc("Returns the content of the specified Compute Node file.")
@route("/pools/{poolId}/nodes/{nodeId}/files/{filePath}")
@get
GetFromComputeNode is Azure.Core.Foundations.Operation<
BatchPoolFileClientRequestHeaders,
{
@header("content-type") contentType: "application/octet-stream";
@doc("The client-request-id provided by the client during the request. This will be returned only if the return-client-request-id parameter was set to true.")
@header
@format("uuid")
"client-request-id"?: string;
@doc("A unique identifier for the request that was made to the Batch service. If a request is consistently failing and you have verified that the request is properly formulated, you may use this value to report the error to Microsoft. In your report, include the value of this request ID, the approximate time that the request was made, the Batch Account against which the request was made, and the region that Account resides in.")
@header
@format("uuid")
"request-id"?: string;
@doc("The ETag HTTP response header. This is an opaque string. You can use it to detect whether the resource has changed between requests. In particular, you can pass the ETag to one of the If-Modified-Since, If-Unmodified-Since, If-Match or If-None-Match headers.")
@header
ETag?: string;
@doc("The time at which the resource was last modified.")
@header
@format("date-time-rfc1123")
"Last-Modified"?: string;
@header
@doc("The file creation time.")
@format("date-time-rfc1123")
"ocp-creation-time"?: string;
@header
@doc("Whether the object represents a directory.")
"ocp-batch-file-isdirectory": boolean;
@header
@doc("The URL of the file.")
"ocp-batch-file-url": string;
@header
@doc("The file mode attribute in octal format.")
"ocp-batch-file-mode": string;
@header
@doc("The length of the file.")
"Content-Length": int64;
@body
@doc("A response containing the file content.")
file: bytes;
}
>;
}
@doc("Common header parms for Pool related File operartions")
model BatchPoolFileClientRequestHeaders {
@doc("The ID of the Pool that contains the Compute Node.")
@path
poolId: string;
@doc("The ID of the Compute Node from which you want to delete the file.")
@path
nodeId: string;
@doc("The path to the file or directory that you want to delete.")
@path
filePath: string;
@doc("""
The byte range to be retrieved. The default is to retrieve the entire file. The
format is bytes=startRange-endRange.
""")
@header
"ocp-range"?: string;
@doc("""
The maximum number of items to return in the response. A maximum of 1000
applications can be returned.
""")
@query
timeOut?: int32 = 30;
@doc("""
The caller-generated request identity, in the form of a GUID with no decoration
such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
""")
@header
@format("uuid")
"client-request-id"?: string;
@doc("Whether the server should return the client-request-id in the response.")
@header
"return-client-request-id"?: boolean = false;
@doc("""
The time the request was issued. Client libraries typically set this to the
current system clock time; set it explicitly if you are calling the REST API
directly.
""")
@header
@format("date-time-rfc1123")
"ocp-date"?: string;
@doc("""
A timestamp indicating the last modified time of the resource known to the
client. The operation will be performed only if the resource on the service has
been modified since the specified time.
""")
@header
@format("date-time-rfc1123")
"If-Modified-Since"?: string;
@doc("""
A timestamp indicating the last modified time of the resource known to the
client. The operation will be performed only if the resource on the service has
not been modified since the specified time.
""")
@header
@format("date-time-rfc1123")
"If-Unmodified-Since"?: string;
}