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