• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="dataflow_v1b3.html">Dataflow API</a> . <a href="dataflow_v1b3.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="dataflow_v1b3.projects.jobs.html">jobs()</a></code>
79</p>
80<p class="firstline">Returns the jobs Resource.</p>
81
82<p class="toc_element">
83  <code><a href="dataflow_v1b3.projects.locations.html">locations()</a></code>
84</p>
85<p class="firstline">Returns the locations Resource.</p>
86
87<p class="toc_element">
88  <code><a href="dataflow_v1b3.projects.snapshots.html">snapshots()</a></code>
89</p>
90<p class="firstline">Returns the snapshots Resource.</p>
91
92<p class="toc_element">
93  <code><a href="dataflow_v1b3.projects.templates.html">templates()</a></code>
94</p>
95<p class="firstline">Returns the templates Resource.</p>
96
97<p class="toc_element">
98  <code><a href="#deleteSnapshots">deleteSnapshots(projectId, location=None, snapshotId=None, x__xgafv=None)</a></code></p>
99<p class="firstline">Deletes a snapshot.</p>
100<p class="toc_element">
101  <code><a href="#workerMessages">workerMessages(projectId, body, x__xgafv=None)</a></code></p>
102<p class="firstline">Send a worker_message to the service.</p>
103<h3>Method Details</h3>
104<div class="method">
105    <code class="details" id="deleteSnapshots">deleteSnapshots(projectId, location=None, snapshotId=None, x__xgafv=None)</code>
106  <pre>Deletes a snapshot.
107
108Args:
109  projectId: string, The ID of the Cloud Platform project that the snapshot belongs to. (required)
110  location: string, The location that contains this snapshot.
111  snapshotId: string, The ID of the snapshot.
112  x__xgafv: string, V1 error format.
113    Allowed values
114      1 - v1 error format
115      2 - v2 error format
116
117Returns:
118  An object of the form:
119
120    { # Response from deleting a snapshot.
121  }</pre>
122</div>
123
124<div class="method">
125    <code class="details" id="workerMessages">workerMessages(projectId, body, x__xgafv=None)</code>
126  <pre>Send a worker_message to the service.
127
128Args:
129  projectId: string, The project to send the WorkerMessages to. (required)
130  body: object, The request body. (required)
131    The object takes the form of:
132
133{ # A request for sending worker messages to the service.
134    "workerMessages": [ # The WorkerMessages to send.
135      { # WorkerMessage provides information to the backend about a worker.
136        "workerShutdownNotice": { # Shutdown notification from workers. This is to be sent by the shutdown # Shutdown notice by workers.
137            # script of the worker VM so that the backend knows that the VM is being
138            # shut down.
139          "reason": "A String", # The reason for the worker shutdown.
140              # Current possible values are:
141              #   "UNKNOWN": shutdown reason is unknown.
142              #   "PREEMPTION": shutdown reason is preemption.
143              # Other possible reasons may be added in the future.
144        },
145        "workerMetrics": { # Worker metrics exported from workers. This contains resource utilization # Resource metrics reported by workers.
146            # metrics accumulated from a variety of sources. For more information, see
147            # go/df-resource-signals.
148          "cpuTime": [ # CPU utilization samples.
149            { # Modeled after information exposed by /proc/stat.
150              "totalMs": "A String", # Total active CPU time across all cores (ie., non-idle) in milliseconds
151                  # since start-up.
152              "rate": 3.14, # Average CPU utilization rate (% non-idle cpu / second) since previous
153                  # sample.
154              "timestamp": "A String", # Timestamp of the measurement.
155            },
156          ],
157        },
158        "workerMessageCode": { # A message code is used to report status and error messages to the service. # A worker message code.
159            # The message codes are intended to be machine readable. The service will
160            # take care of translating these into user understandable messages if
161            # necessary.
162            #
163            # Example use cases:
164            #   1. Worker processes reporting successful startup.
165            #   2. Worker processes reporting specific errors (e.g. package staging
166            #      failure).
167          "code": "A String", # The code is a string intended for consumption by a machine that identifies
168              # the type of message being sent.
169              # Examples:
170              #  1. "HARNESS_STARTED" might be used to indicate the worker harness has
171              #      started.
172              #  2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading
173              #     a GCS file as part of the boot process of one of the worker containers.
174              #
175              # This is a string and not an enum to make it easy to add new codes without
176              # waiting for an API change.
177          "parameters": { # Parameters contains specific information about the code.
178              #
179              # This is a struct to allow parameters of different types.
180              #
181              # Examples:
182              #  1. For a "HARNESS_STARTED" message parameters might provide the name
183              #     of the worker and additional data like timing information.
184              #  2. For a "GCS_DOWNLOAD_ERROR" parameters might contain fields listing
185              #     the GCS objects being downloaded and fields containing errors.
186              #
187              # In general complex data structures should be avoided. If a worker
188              # needs to send a specific and complicated data structure then please
189              # consider defining a new proto and adding it to the data oneof in
190              # WorkerMessageResponse.
191              #
192              # Conventions:
193              #  Parameters should only be used for information that isn't typically passed
194              #  as a label.
195              #  hostname and other worker identifiers should almost always be passed
196              #  as labels since they will be included on most messages.
197            "a_key": "", # Properties of the object.
198          },
199        },
200        "labels": { # Labels are used to group WorkerMessages.
201            # For example, a worker_message about a particular container
202            # might have the labels:
203            # { "JOB_ID": "2015-04-22",
204            #   "WORKER_ID": "wordcount-vm-2015…"
205            #   "CONTAINER_TYPE": "worker",
206            #   "CONTAINER_ID": "ac1234def"}
207            # Label tags typically correspond to Label enum values. However, for ease
208            # of development other strings can be used as tags. LABEL_UNSPECIFIED should
209            # not be used here.
210          "a_key": "A String",
211        },
212        "workerLifecycleEvent": { # A report of an event in a worker's lifecycle. # Record of worker lifecycle events.
213            # The proto contains one event, because the worker is expected to
214            # asynchronously send each message immediately after the event.
215            # Due to this asynchrony, messages may arrive out of order (or missing), and it
216            # is up to the consumer to interpret.
217            # The timestamp of the event is in the enclosing WorkerMessage proto.
218          "event": "A String", # The event being reported.
219          "containerStartTime": "A String", # The start time of this container. All events will report this so that
220              # events can be grouped together across container/VM restarts.
221          "metadata": { # Other stats that can accompany an event. E.g.
222              # { "downloaded_bytes" : "123456" }
223            "a_key": "A String",
224          },
225        },
226        "time": "A String", # The timestamp of the worker_message.
227        "workerHealthReport": { # WorkerHealthReport contains information about the health of a worker. # The health of a worker.
228            #
229            # The VM should be identified by the labels attached to the WorkerMessage that
230            # this health ping belongs to.
231          "vmIsBroken": True or False, # Whether the VM is in a permanently broken state.
232              # Broken VMs should be abandoned or deleted ASAP to avoid assigning or
233              # completing any work.
234          "vmStartupTime": "A String", # The time the VM was booted.
235          "vmIsHealthy": True or False, # Whether the VM is currently healthy.
236          "msg": "A String", # A message describing any unusual health reports.
237          "reportInterval": "A String", # The interval at which the worker is sending health reports.
238              # The default value of 0 should be interpreted as the field is not being
239              # explicitly set by the worker.
240          "pods": [ # The pods running on the worker. See:
241              # http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod
242              #
243              # This field is used by the worker to send the status of the indvidual
244              # containers running on each worker.
245            {
246              "a_key": "", # Properties of the object.
247            },
248          ],
249        },
250      },
251    ],
252    "location": "A String", # The [regional endpoint]
253        # (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
254        # contains the job.
255  }
256
257  x__xgafv: string, V1 error format.
258    Allowed values
259      1 - v1 error format
260      2 - v2 error format
261
262Returns:
263  An object of the form:
264
265    { # The response to the worker messages.
266    "workerMessageResponses": [ # The servers response to the worker messages.
267      { # A worker_message response allows the server to pass information to the
268          # sender.
269        "workerHealthReportResponse": { # WorkerHealthReportResponse contains information returned to the worker # The service's response to a worker's health report.
270            # in response to a health ping.
271          "reportInterval": "A String", # A positive value indicates the worker should change its reporting interval
272              # to the specified value.
273              #
274              # The default value of zero means no change in report rate is requested by
275              # the server.
276        },
277        "workerMetricsResponse": { # Service-side response to WorkerMessage reporting resource utilization. # Service's response to reporting worker metrics (currently empty).
278        },
279        "workerShutdownNoticeResponse": { # Service-side response to WorkerMessage issuing shutdown notice. # Service's response to shutdown notice (currently empty).
280        },
281      },
282    ],
283  }</pre>
284</div>
285
286</body></html>