@maxim_mazurok/gapi.client.batch-v1 0.0.20230526 → 0.0.20230607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +104 -3
  2. package/package.json +1 -1
  3. package/tests.ts +1 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://batch.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230526
12
+ // Revision: 20230607
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -38,6 +38,37 @@ declare namespace gapi.client {
38
38
  exitCodes?:
39
39
  number[];
40
40
  }
41
+ interface AgentContainer {
42
+ /**
43
+ * Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments
44
+ * to the ENTRYPOINT.
45
+ */
46
+ commands?:
47
+ string[];
48
+ /** Overrides the `ENTRYPOINT` specified in the container. */
49
+ entrypoint?:
50
+ string;
51
+ /** The URI to pull the container image from. */
52
+ imageUri?:
53
+ string;
54
+ /** Arbitrary additional options to include in the "docker run" command when running this container, e.g. "--network host". */
55
+ options?:
56
+ string;
57
+ /** Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro */
58
+ volumes?:
59
+ string[];
60
+ }
61
+ interface AgentEnvironment {
62
+ /** An encrypted JSON dictionary where the key/value pairs correspond to environment variable names and their values. */
63
+ encryptedVariables?:
64
+ AgentKMSEnvMap;
65
+ /** A map of environment variable names to Secret Manager secret names. The VM will access the named secrets to set the value of each environment variable. */
66
+ secretVariables?:
67
+ { [P in string]: string };
68
+ /** A map of environment variable names to values. */
69
+ variables?:
70
+ { [P in string]: string };
71
+ }
41
72
  interface AgentInfo {
42
73
  /** The assigned Job ID */
43
74
  jobId?:
@@ -55,6 +86,14 @@ declare namespace gapi.client {
55
86
  tasks?:
56
87
  AgentTaskInfo[];
57
88
  }
89
+ interface AgentKMSEnvMap {
90
+ /** The value of the cipherText response from the `encrypt` method. */
91
+ cipherText?:
92
+ string;
93
+ /** The name of the KMS key that will be used to decrypt the cipher text. */
94
+ keyName?:
95
+ string;
96
+ }
58
97
  interface AgentMetadata {
59
98
  /** When the VM agent started. Use agent_startup_time instead. */
60
99
  creationTime?:
@@ -87,14 +126,35 @@ declare namespace gapi.client {
87
126
  zone?:
88
127
  string;
89
128
  }
129
+ interface AgentScript {
130
+ /**
131
+ * Script file path on the host VM. To specify an interpreter, please add a `#!`(also known as [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the first line of the
132
+ * file.(For example, to execute the script using bash, `#!/bin/bash` should be the first line of the file. To execute the script using`Python3`, `#!/usr/bin/env python3` should be the
133
+ * first line of the file.) Otherwise, the file will by default be excuted by `/bin/sh`.
134
+ */
135
+ path?:
136
+ string;
137
+ /**
138
+ * Shell script text. To specify an interpreter, please add a `#!\n` at the beginning of the text.(For example, to execute the script using bash, `#!/bin/bash\n` should be added. To
139
+ * execute the script using`Python3`, `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will by default be excuted by `/bin/sh`.
140
+ */
141
+ text?:
142
+ string;
143
+ }
90
144
  interface AgentTask {
145
+ /**
146
+ * AgentTaskSpec is the taskSpec representation between Agent and CLH communication. This field will replace the TaskSpec field above in future to have a better separation between
147
+ * user-facaing API and internal API.
148
+ */
149
+ agentTaskSpec?:
150
+ AgentTaskSpec;
91
151
  /** The intended state of the task. */
92
152
  intendedState?:
93
153
  string;
94
154
  /** The highest barrier reached by all tasks in the task's TaskGroup. */
95
155
  reachedBarrier?:
96
156
  string;
97
- /** Task Spec. */
157
+ /** Task Spec. This field will be replaced by agent_task_spec below in future. */
98
158
  spec?:
99
159
  TaskSpec;
100
160
  /** Task status. */
@@ -118,6 +178,47 @@ declare namespace gapi.client {
118
178
  taskStatus?:
119
179
  TaskStatus;
120
180
  }
181
+ interface AgentTaskRunnable {
182
+ /**
183
+ * By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for
184
+ * Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then
185
+ * no further Runnables will execute, not even always_run Runnables.
186
+ */
187
+ alwaysRun?:
188
+ boolean;
189
+ /**
190
+ * This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide
191
+ * debugging support tools like SSH servers).
192
+ */
193
+ background?:
194
+ boolean;
195
+ /** Container runnable. */
196
+ container?:
197
+ AgentContainer;
198
+ /** Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup). */
199
+ environment?:
200
+ AgentEnvironment;
201
+ /** Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead. */
202
+ ignoreExitStatus?:
203
+ boolean;
204
+ /** Script runnable. */
205
+ script?:
206
+ AgentScript;
207
+ /** Timeout for this Runnable. */
208
+ timeout?:
209
+ string;
210
+ }
211
+ interface AgentTaskSpec {
212
+ /** Environment variables to set before running the Task. */
213
+ environment?:
214
+ AgentEnvironment;
215
+ /** Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. */
216
+ maxRunDuration?:
217
+ string;
218
+ /** AgentTaskRunnable is runanbles that will be executed on the agent. */
219
+ runnables?:
220
+ AgentTaskRunnable[];
221
+ }
121
222
  interface AgentTimingInfo {
122
223
  /** Agent startup time */
123
224
  agentStartupTime?:
@@ -224,7 +325,7 @@ declare namespace gapi.client {
224
325
  * Name of a public or custom image used as the data source. For example, the following are all valid URLs: * Specify the image by its family name:
225
326
  * projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short
226
327
  * names. The following image values are supported for a boot disk: * "batch-debian": use Batch Debian images. * "batch-centos": use Batch CentOS images. * "batch-cos": use Batch
227
- * Container-Optimized images.
328
+ * Container-Optimized images. * "batch-hpc-centos": use Batch HPC CentOS images.
228
329
  */
229
330
  image?:
230
331
  string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.batch-v1",
3
- "version": "0.0.20230526",
3
+ "version": "0.0.20230607",
4
4
  "description": "TypeScript typings for Batch API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230526
6
+ // Revision: 20230607
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */