blob: 0ae70a474750860e0a630c0f16d3a717395dbb26 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<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="dataproc_v1.html">Google Cloud Dataproc API</a> . <a href="dataproc_v1.projects.html">projects</a> . <a href="dataproc_v1.projects.regions.html">regions</a> . <a href="dataproc_v1.projects.regions.clusters.html">clusters</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(projectId, region, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a cluster in a project.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(projectId, region, clusterName, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a cluster in a project.</p>
83<p class="toc_element">
84 <code><a href="#diagnose">diagnose(projectId, region, clusterName, body, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets cluster diagnostic information. After the operation completes, the Operation.response field contains `DiagnoseClusterOutputLocation`.</p>
86<p class="toc_element">
87 <code><a href="#get">get(projectId, region, clusterName, x__xgafv=None)</a></code></p>
88<p class="firstline">Gets the resource representation for a cluster in a project.</p>
89<p class="toc_element">
90 <code><a href="#list">list(projectId, region, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Lists all regions/{region}/clusters in a project.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#patch">patch(projectId, region, clusterName, body, updateMask=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Updates a cluster in a project.</p>
98<h3>Method Details</h3>
99<div class="method">
100 <code class="details" id="create">create(projectId, region, body, x__xgafv=None)</code>
101 <pre>Creates a cluster in a project.
102
103Args:
104 projectId: string, [Required] The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700105 region: string, [Required] The Cloud Dataproc region in which to handle the request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800106 body: object, The request body. (required)
107 The object takes the form of:
108
109{ # Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.
110 "status": { # The status of a cluster and its instances. # [Output-only] Cluster status.
111 "state": "A String", # The cluster's state.
112 "stateStartTime": "A String", # Time when this state was entered.
113 "detail": "A String", # Optional details of cluster's state.
114 },
115 "clusterUuid": "A String", # [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700116 "clusterName": "A String", # [Required] The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800117 "projectId": "A String", # [Required] The Google Cloud Platform project ID that the cluster belongs to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700118 "statusHistory": [ # [Output-only] The previous cluster status.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800119 { # The status of a cluster and its instances.
120 "state": "A String", # The cluster's state.
121 "stateStartTime": "A String", # Time when this state was entered.
122 "detail": "A String", # Optional details of cluster's state.
123 },
124 ],
125 "config": { # The cluster config. # [Required] The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.
126 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # [Optional] The config settings for software inside the cluster.
127 "imageVersion": "A String", # [Optional] The version of software inside the cluster. It must match the regular expression `[0-9]+\.[0-9]+`. If unspecified, it defaults to the latest version (see [Cloud Dataproc Versioning](/dataproc/versioning)).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700128 "properties": { # [Optional] The properties to set on daemon config files. Property keys are specified in `prefix:property` format, such as `core:fs.defaultFS`. The following are supported prefixes and their mappings: * core: `core-site.xml` * hdfs: `hdfs-site.xml` * mapred: `mapred-site.xml` * yarn: `yarn-site.xml` * hive: `hive-site.xml` * pig: `pig.properties` * spark: `spark-defaults.conf`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800129 "a_key": "A String",
130 },
131 },
132 "configBucket": "A String", # [Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700133 "gceClusterConfig": { # Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster. # [Required] The shared Google Compute Engine config settings for all instances in a cluster.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800134 "networkUri": "A String", # The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`.
135 "tags": [ # The Google Compute Engine tags to add to all instances.
136 "A String",
137 ],
138 "zoneUri": "A String", # [Required] The zone where the Google Compute Engine cluster will be located. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`.
139 "subnetworkUri": "A String", # The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700140 "serviceAccountScopes": [ # The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: * https://www.googleapis.com/auth/cloud.useraccounts.readonly * https://www.googleapis.com/auth/devstorage.read_write * https://www.googleapis.com/auth/logging.write If no scopes are specfied, the following defaults are also provided: * https://www.googleapis.com/auth/bigquery * https://www.googleapis.com/auth/bigtable.admin.table * https://www.googleapis.com/auth/bigtable.data * https://www.googleapis.com/auth/devstorage.full_control
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800141 "A String",
142 ],
143 "metadata": { # The Google Compute Engine metadata entries to add to all instances.
144 "a_key": "A String",
145 },
146 },
147 "workerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for worker instances in a cluster.
148 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
149 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700150 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800151 "A String",
152 ],
153 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
154 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
155 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
156 },
157 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
158 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
159 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
160 },
161 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
162 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
163 },
164 "initializationActions": [ # [Optional] Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below: ROLE=$(/usr/share/google/get_metadata_value attributes/role) if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi
165 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
166 "executionTimeout": "A String", # [Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.
167 "executableFile": "A String", # [Required] Google Cloud Storage URI of executable file.
168 },
169 ],
170 "secondaryWorkerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for additional worker instances in a cluster.
171 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
172 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700173 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800174 "A String",
175 ],
176 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
177 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
178 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
179 },
180 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
181 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
182 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
183 },
184 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
185 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
186 },
187 "masterConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for the master instance in a cluster.
188 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
189 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700190 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800191 "A String",
192 ],
193 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
194 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
195 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
196 },
197 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
198 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
199 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
200 },
201 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
202 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
203 },
204 },
205}
206
207 x__xgafv: string, V1 error format.
208
209Returns:
210 An object of the form:
211
212 { # This resource represents a long-running operation that is the result of a network API call.
213 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
214 "a_key": "", # Properties of the object. Contains field @ype with type URL.
215 },
216 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. # The error result of the operation in case of failure.
217 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
218 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
219 "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
220 {
221 "a_key": "", # Properties of the object. Contains field @ype with type URL.
222 },
223 ],
224 },
225 "done": True or False, # If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700226 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800227 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
228 "a_key": "", # Properties of the object. Contains field @ype with type URL.
229 },
230 }</pre>
231</div>
232
233<div class="method">
234 <code class="details" id="delete">delete(projectId, region, clusterName, x__xgafv=None)</code>
235 <pre>Deletes a cluster in a project.
236
237Args:
238 projectId: string, [Required] The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700239 region: string, [Required] The Cloud Dataproc region in which to handle the request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800240 clusterName: string, [Required] The cluster name. (required)
241 x__xgafv: string, V1 error format.
242
243Returns:
244 An object of the form:
245
246 { # This resource represents a long-running operation that is the result of a network API call.
247 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
248 "a_key": "", # Properties of the object. Contains field @ype with type URL.
249 },
250 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. # The error result of the operation in case of failure.
251 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
252 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
253 "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
254 {
255 "a_key": "", # Properties of the object. Contains field @ype with type URL.
256 },
257 ],
258 },
259 "done": True or False, # If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700260 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800261 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
262 "a_key": "", # Properties of the object. Contains field @ype with type URL.
263 },
264 }</pre>
265</div>
266
267<div class="method">
268 <code class="details" id="diagnose">diagnose(projectId, region, clusterName, body, x__xgafv=None)</code>
269 <pre>Gets cluster diagnostic information. After the operation completes, the Operation.response field contains `DiagnoseClusterOutputLocation`.
270
271Args:
272 projectId: string, [Required] The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700273 region: string, [Required] The Cloud Dataproc region in which to handle the request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800274 clusterName: string, [Required] The cluster name. (required)
275 body: object, The request body. (required)
276 The object takes the form of:
277
278{ # A request to collect cluster diagnostic information.
279 }
280
281 x__xgafv: string, V1 error format.
282
283Returns:
284 An object of the form:
285
286 { # This resource represents a long-running operation that is the result of a network API call.
287 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
288 "a_key": "", # Properties of the object. Contains field @ype with type URL.
289 },
290 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. # The error result of the operation in case of failure.
291 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
292 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
293 "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
294 {
295 "a_key": "", # Properties of the object. Contains field @ype with type URL.
296 },
297 ],
298 },
299 "done": True or False, # If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700300 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800301 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
302 "a_key": "", # Properties of the object. Contains field @ype with type URL.
303 },
304 }</pre>
305</div>
306
307<div class="method">
308 <code class="details" id="get">get(projectId, region, clusterName, x__xgafv=None)</code>
309 <pre>Gets the resource representation for a cluster in a project.
310
311Args:
312 projectId: string, [Required] The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700313 region: string, [Required] The Cloud Dataproc region in which to handle the request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800314 clusterName: string, [Required] The cluster name. (required)
315 x__xgafv: string, V1 error format.
316
317Returns:
318 An object of the form:
319
320 { # Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.
321 "status": { # The status of a cluster and its instances. # [Output-only] Cluster status.
322 "state": "A String", # The cluster's state.
323 "stateStartTime": "A String", # Time when this state was entered.
324 "detail": "A String", # Optional details of cluster's state.
325 },
326 "clusterUuid": "A String", # [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700327 "clusterName": "A String", # [Required] The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800328 "projectId": "A String", # [Required] The Google Cloud Platform project ID that the cluster belongs to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700329 "statusHistory": [ # [Output-only] The previous cluster status.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800330 { # The status of a cluster and its instances.
331 "state": "A String", # The cluster's state.
332 "stateStartTime": "A String", # Time when this state was entered.
333 "detail": "A String", # Optional details of cluster's state.
334 },
335 ],
336 "config": { # The cluster config. # [Required] The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.
337 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # [Optional] The config settings for software inside the cluster.
338 "imageVersion": "A String", # [Optional] The version of software inside the cluster. It must match the regular expression `[0-9]+\.[0-9]+`. If unspecified, it defaults to the latest version (see [Cloud Dataproc Versioning](/dataproc/versioning)).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700339 "properties": { # [Optional] The properties to set on daemon config files. Property keys are specified in `prefix:property` format, such as `core:fs.defaultFS`. The following are supported prefixes and their mappings: * core: `core-site.xml` * hdfs: `hdfs-site.xml` * mapred: `mapred-site.xml` * yarn: `yarn-site.xml` * hive: `hive-site.xml` * pig: `pig.properties` * spark: `spark-defaults.conf`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800340 "a_key": "A String",
341 },
342 },
343 "configBucket": "A String", # [Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700344 "gceClusterConfig": { # Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster. # [Required] The shared Google Compute Engine config settings for all instances in a cluster.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800345 "networkUri": "A String", # The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`.
346 "tags": [ # The Google Compute Engine tags to add to all instances.
347 "A String",
348 ],
349 "zoneUri": "A String", # [Required] The zone where the Google Compute Engine cluster will be located. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`.
350 "subnetworkUri": "A String", # The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700351 "serviceAccountScopes": [ # The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: * https://www.googleapis.com/auth/cloud.useraccounts.readonly * https://www.googleapis.com/auth/devstorage.read_write * https://www.googleapis.com/auth/logging.write If no scopes are specfied, the following defaults are also provided: * https://www.googleapis.com/auth/bigquery * https://www.googleapis.com/auth/bigtable.admin.table * https://www.googleapis.com/auth/bigtable.data * https://www.googleapis.com/auth/devstorage.full_control
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800352 "A String",
353 ],
354 "metadata": { # The Google Compute Engine metadata entries to add to all instances.
355 "a_key": "A String",
356 },
357 },
358 "workerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for worker instances in a cluster.
359 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
360 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700361 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800362 "A String",
363 ],
364 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
365 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
366 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
367 },
368 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
369 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
370 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
371 },
372 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
373 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
374 },
375 "initializationActions": [ # [Optional] Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below: ROLE=$(/usr/share/google/get_metadata_value attributes/role) if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi
376 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
377 "executionTimeout": "A String", # [Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.
378 "executableFile": "A String", # [Required] Google Cloud Storage URI of executable file.
379 },
380 ],
381 "secondaryWorkerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for additional worker instances in a cluster.
382 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
383 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700384 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800385 "A String",
386 ],
387 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
388 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
389 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
390 },
391 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
392 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
393 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
394 },
395 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
396 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
397 },
398 "masterConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for the master instance in a cluster.
399 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
400 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700401 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800402 "A String",
403 ],
404 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
405 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
406 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
407 },
408 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
409 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
410 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
411 },
412 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
413 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
414 },
415 },
416 }</pre>
417</div>
418
419<div class="method">
420 <code class="details" id="list">list(projectId, region, pageSize=None, pageToken=None, x__xgafv=None)</code>
421 <pre>Lists all regions/{region}/clusters in a project.
422
423Args:
424 projectId: string, [Required] The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700425 region: string, [Required] The Cloud Dataproc region in which to handle the request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800426 pageSize: integer, The standard List page size.
427 pageToken: string, The standard List page token.
428 x__xgafv: string, V1 error format.
429
430Returns:
431 An object of the form:
432
433 { # The list of all clusters in a project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700434 "nextPageToken": "A String", # [Optional] This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `page_token` in a subsequent ListClustersRequest.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800435 "clusters": [ # [Output-only] The clusters in the project.
436 { # Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.
437 "status": { # The status of a cluster and its instances. # [Output-only] Cluster status.
438 "state": "A String", # The cluster's state.
439 "stateStartTime": "A String", # Time when this state was entered.
440 "detail": "A String", # Optional details of cluster's state.
441 },
442 "clusterUuid": "A String", # [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700443 "clusterName": "A String", # [Required] The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800444 "projectId": "A String", # [Required] The Google Cloud Platform project ID that the cluster belongs to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700445 "statusHistory": [ # [Output-only] The previous cluster status.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800446 { # The status of a cluster and its instances.
447 "state": "A String", # The cluster's state.
448 "stateStartTime": "A String", # Time when this state was entered.
449 "detail": "A String", # Optional details of cluster's state.
450 },
451 ],
452 "config": { # The cluster config. # [Required] The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.
453 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # [Optional] The config settings for software inside the cluster.
454 "imageVersion": "A String", # [Optional] The version of software inside the cluster. It must match the regular expression `[0-9]+\.[0-9]+`. If unspecified, it defaults to the latest version (see [Cloud Dataproc Versioning](/dataproc/versioning)).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700455 "properties": { # [Optional] The properties to set on daemon config files. Property keys are specified in `prefix:property` format, such as `core:fs.defaultFS`. The following are supported prefixes and their mappings: * core: `core-site.xml` * hdfs: `hdfs-site.xml` * mapred: `mapred-site.xml` * yarn: `yarn-site.xml` * hive: `hive-site.xml` * pig: `pig.properties` * spark: `spark-defaults.conf`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800456 "a_key": "A String",
457 },
458 },
459 "configBucket": "A String", # [Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700460 "gceClusterConfig": { # Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster. # [Required] The shared Google Compute Engine config settings for all instances in a cluster.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800461 "networkUri": "A String", # The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`.
462 "tags": [ # The Google Compute Engine tags to add to all instances.
463 "A String",
464 ],
465 "zoneUri": "A String", # [Required] The zone where the Google Compute Engine cluster will be located. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`.
466 "subnetworkUri": "A String", # The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700467 "serviceAccountScopes": [ # The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: * https://www.googleapis.com/auth/cloud.useraccounts.readonly * https://www.googleapis.com/auth/devstorage.read_write * https://www.googleapis.com/auth/logging.write If no scopes are specfied, the following defaults are also provided: * https://www.googleapis.com/auth/bigquery * https://www.googleapis.com/auth/bigtable.admin.table * https://www.googleapis.com/auth/bigtable.data * https://www.googleapis.com/auth/devstorage.full_control
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800468 "A String",
469 ],
470 "metadata": { # The Google Compute Engine metadata entries to add to all instances.
471 "a_key": "A String",
472 },
473 },
474 "workerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for worker instances in a cluster.
475 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
476 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700477 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800478 "A String",
479 ],
480 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
481 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
482 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
483 },
484 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
485 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
486 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
487 },
488 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
489 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
490 },
491 "initializationActions": [ # [Optional] Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below: ROLE=$(/usr/share/google/get_metadata_value attributes/role) if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi
492 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
493 "executionTimeout": "A String", # [Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.
494 "executableFile": "A String", # [Required] Google Cloud Storage URI of executable file.
495 },
496 ],
497 "secondaryWorkerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for additional worker instances in a cluster.
498 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
499 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700500 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800501 "A String",
502 ],
503 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
504 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
505 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
506 },
507 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
508 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
509 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
510 },
511 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
512 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
513 },
514 "masterConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for the master instance in a cluster.
515 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
516 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700517 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800518 "A String",
519 ],
520 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
521 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
522 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
523 },
524 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
525 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
526 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
527 },
528 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
529 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
530 },
531 },
532 },
533 ],
534 }</pre>
535</div>
536
537<div class="method">
538 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
539 <pre>Retrieves the next page of results.
540
541Args:
542 previous_request: The request for the previous page. (required)
543 previous_response: The response from the request for the previous page. (required)
544
545Returns:
546 A request object that you can call 'execute()' on to request the next
547 page. Returns None if there are no more items in the collection.
548 </pre>
549</div>
550
551<div class="method">
552 <code class="details" id="patch">patch(projectId, region, clusterName, body, updateMask=None, x__xgafv=None)</code>
553 <pre>Updates a cluster in a project.
554
555Args:
556 projectId: string, [Required] The ID of the Google Cloud Platform project the cluster belongs to. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700557 region: string, [Required] The Cloud Dataproc region in which to handle the request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800558 clusterName: string, [Required] The cluster name. (required)
559 body: object, The request body. (required)
560 The object takes the form of:
561
562{ # Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.
563 "status": { # The status of a cluster and its instances. # [Output-only] Cluster status.
564 "state": "A String", # The cluster's state.
565 "stateStartTime": "A String", # Time when this state was entered.
566 "detail": "A String", # Optional details of cluster's state.
567 },
568 "clusterUuid": "A String", # [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700569 "clusterName": "A String", # [Required] The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800570 "projectId": "A String", # [Required] The Google Cloud Platform project ID that the cluster belongs to.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700571 "statusHistory": [ # [Output-only] The previous cluster status.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800572 { # The status of a cluster and its instances.
573 "state": "A String", # The cluster's state.
574 "stateStartTime": "A String", # Time when this state was entered.
575 "detail": "A String", # Optional details of cluster's state.
576 },
577 ],
578 "config": { # The cluster config. # [Required] The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.
579 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # [Optional] The config settings for software inside the cluster.
580 "imageVersion": "A String", # [Optional] The version of software inside the cluster. It must match the regular expression `[0-9]+\.[0-9]+`. If unspecified, it defaults to the latest version (see [Cloud Dataproc Versioning](/dataproc/versioning)).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700581 "properties": { # [Optional] The properties to set on daemon config files. Property keys are specified in `prefix:property` format, such as `core:fs.defaultFS`. The following are supported prefixes and their mappings: * core: `core-site.xml` * hdfs: `hdfs-site.xml` * mapred: `mapred-site.xml` * yarn: `yarn-site.xml` * hive: `hive-site.xml` * pig: `pig.properties` * spark: `spark-defaults.conf`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800582 "a_key": "A String",
583 },
584 },
585 "configBucket": "A String", # [Optional] A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700586 "gceClusterConfig": { # Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster. # [Required] The shared Google Compute Engine config settings for all instances in a cluster.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800587 "networkUri": "A String", # The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see https://cloud.google.com/compute/docs/subnetworks for more information). Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`.
588 "tags": [ # The Google Compute Engine tags to add to all instances.
589 "A String",
590 ],
591 "zoneUri": "A String", # [Required] The zone where the Google Compute Engine cluster will be located. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`.
592 "subnetworkUri": "A String", # The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700593 "serviceAccountScopes": [ # The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included: * https://www.googleapis.com/auth/cloud.useraccounts.readonly * https://www.googleapis.com/auth/devstorage.read_write * https://www.googleapis.com/auth/logging.write If no scopes are specfied, the following defaults are also provided: * https://www.googleapis.com/auth/bigquery * https://www.googleapis.com/auth/bigtable.admin.table * https://www.googleapis.com/auth/bigtable.data * https://www.googleapis.com/auth/devstorage.full_control
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800594 "A String",
595 ],
596 "metadata": { # The Google Compute Engine metadata entries to add to all instances.
597 "a_key": "A String",
598 },
599 },
600 "workerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for worker instances in a cluster.
601 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
602 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700603 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800604 "A String",
605 ],
606 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
607 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
608 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
609 },
610 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
611 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
612 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
613 },
614 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
615 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
616 },
617 "initializationActions": [ # [Optional] Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below: ROLE=$(/usr/share/google/get_metadata_value attributes/role) if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi
618 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
619 "executionTimeout": "A String", # [Optional] Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.
620 "executableFile": "A String", # [Required] Google Cloud Storage URI of executable file.
621 },
622 ],
623 "secondaryWorkerConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for additional worker instances in a cluster.
624 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
625 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700626 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800627 "A String",
628 ],
629 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
630 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
631 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
632 },
633 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
634 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
635 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
636 },
637 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
638 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
639 },
640 "masterConfig": { # The config settings for Google Compute Engine resources in an instance group, such as a master or worker group. # [Optional] The Google Compute Engine config settings for the master instance in a cluster.
641 "isPreemptible": True or False, # Specifies that this instance group contains Preemptible Instances.
642 "machineTypeUri": "A String", # The Google Compute Engine machine type used for cluster instances. Example: `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700643 "instanceNames": [ # The list of instance names. Cloud Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800644 "A String",
645 ],
646 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Disk option config settings.
647 "numLocalSsds": 42, # [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
648 "bootDiskSizeGb": 42, # [Optional] Size in GB of the boot disk (default is 500GB).
649 },
650 "managedGroupConfig": { # Specifies the resources used to actively manage an instance group. # [Output-only] The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
651 "instanceTemplateName": "A String", # [Output-only] The name of the Instance Template used for the Managed Instance Group.
652 "instanceGroupManagerName": "A String", # [Output-only] The name of the Instance Group Manager for this group.
653 },
654 "numInstances": 42, # The number of VM instances in the instance group. For master instance groups, must be set to 1.
655 "imageUri": "A String", # [Output-only] The Google Compute Engine image resource used for cluster instances. Inferred from `SoftwareConfig.image_version`.
656 },
657 },
658}
659
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700660 updateMask: string, [Required] Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the `PATCH` request body would specify the new value, as follows: { "config":{ "workerConfig":{ "numInstances":"5" } } } Similarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the `PATCH` request body would be set as follows: { "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } } Note: Currently, config.worker_config.num_instances and config.secondary_worker_config.num_instances are the only fields that can be updated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800661 x__xgafv: string, V1 error format.
662
663Returns:
664 An object of the form:
665
666 { # This resource represents a long-running operation that is the result of a network API call.
667 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
668 "a_key": "", # Properties of the object. Contains field @ype with type URL.
669 },
670 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons. # The error result of the operation in case of failure.
671 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
672 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
673 "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
674 {
675 "a_key": "", # Properties of the object. Contains field @ype with type URL.
676 },
677 ],
678 },
679 "done": True or False, # If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700680 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800681 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
682 "a_key": "", # Properties of the object. Contains field @ype with type URL.
683 },
684 }</pre>
685</div>
686
687</body></html>