blob: c590d628b56c5ad425594b83e64a97620ae620a1 [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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="dataproc_v1.html">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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(projectId, region, body=None, requestId=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080080<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#delete">delete(projectId, region, clusterName, clusterUuid=None, requestId=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070082<p class="firstline">Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080083<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#diagnose">diagnose(projectId, region, clusterName, body=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070085<p class="firstline">Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). After the operation completes, Operation.response contains DiagnoseClusterResults (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080086<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.</p>
92<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(projectId, region, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070094<p class="firstline">Lists all regions/{region}/clusters in a project alphabetically.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#patch">patch(projectId, region, clusterName, body=None, gracefulDecommissionTimeout=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700100<p class="firstline">Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800107<h3>Method Details</h3>
108<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code class="details" id="create">create(projectId, region, body=None, requestId=None, x__xgafv=None)</code>
110 <pre>Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800111
112Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400113 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 region: string, Required. The Dataproc region in which to handle the request. (required)
115 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116 The object takes the form of:
117
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118{ # Describes the identifying information, config, and status of a cluster of Compute Engine instances.
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
120 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.
121 &quot;projectId&quot;: &quot;A String&quot;, # Required. The Google Cloud Platform project ID that the cluster belongs to.
122 &quot;labels&quot;: { # Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.
123 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800124 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700125 &quot;metrics&quot;: { # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. # Output only. Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
126 &quot;hdfsMetrics&quot;: { # The HDFS metrics.
127 &quot;a_key&quot;: &quot;A String&quot;,
128 },
129 &quot;yarnMetrics&quot;: { # The YARN metrics.
130 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800131 },
132 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &quot;status&quot;: { # The status of a cluster and its instances. # Output only. Cluster status.
134 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
135 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
136 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
137 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800138 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;statusHistory&quot;: [ # Output only. The previous cluster status.
140 { # The status of a cluster and its instances.
141 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
142 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
143 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
144 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800145 },
146 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;config&quot;: { # The cluster config. # Required. The cluster config. Note that Dataproc may set default values, and values may change when clusters are updated.
148 &quot;masterConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for the master instance in a cluster.
149 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
150 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
151 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
152 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
153 },
154 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
155 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
156 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
157 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
158 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
159 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
160 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
161 # projects/[project_id]/global/images/[image-id]
162 # image-idImage family examples. Dataproc will use the most recent image from the family:
163 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
164 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
165 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
166 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
167 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
168 },
169 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
170 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
171 &quot;A String&quot;,
172 ],
173 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
174 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
175 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
176 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
177 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
178 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
179 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
180 },
181 ],
182 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
183 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
184 },
185 &quot;secondaryWorkerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for additional worker instances in a cluster.
186 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
187 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
188 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
189 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
190 },
191 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
192 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
193 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
194 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
195 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
196 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
197 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
198 # projects/[project_id]/global/images/[image-id]
199 # image-idImage family examples. Dataproc will use the most recent image from the family:
200 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
201 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
202 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
203 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
204 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
205 },
206 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
207 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
208 &quot;A String&quot;,
209 ],
210 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
211 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
212 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
213 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
214 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
215 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
216 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
217 },
218 ],
219 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
220 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
221 },
222 &quot;encryptionConfig&quot;: { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster.
223 &quot;gcePdKmsKeyName&quot;: &quot;A String&quot;, # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster.
224 },
225 &quot;securityConfig&quot;: { # Security related configuration, including Kerberos. # Optional. Security settings for the cluster.
226 &quot;kerberosConfig&quot;: { # Specifies Kerberos related configuration. # Kerberos related configuration.
227 &quot;keystorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided keystore. For the self-signed certificate, this password is generated by Dataproc.
228 &quot;crossRealmTrustAdminServer&quot;: &quot;A String&quot;, # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
229 &quot;kdcDbKeyUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database.
230 &quot;truststorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided truststore. For the self-signed certificate, this password is generated by Dataproc.
231 &quot;realm&quot;: &quot;A String&quot;, # Optional. The name of the on-cluster Kerberos realm. If not specified, the uppercased domain of hostnames will be the realm.
232 &quot;enableKerberos&quot;: True or False, # Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set this field to true to enable Kerberos on a cluster.
233 &quot;truststoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
234 &quot;crossRealmTrustRealm&quot;: &quot;A String&quot;, # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust.
235 &quot;rootPrincipalPasswordUri&quot;: &quot;A String&quot;, # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password.
236 &quot;kmsKeyUri&quot;: &quot;A String&quot;, # Required. The uri of the KMS key used to encrypt various sensitive files.
237 &quot;crossRealmTrustKdc&quot;: &quot;A String&quot;, # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
238 &quot;crossRealmTrustSharedPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the shared password between the on-cluster Kerberos realm and the remote trusted realm, in a cross realm trust relationship.
239 &quot;tgtLifetimeHours&quot;: 42, # Optional. The lifetime of the ticket granting ticket, in hours. If not specified, or user specifies 0, then default value 10 will be used.
240 &quot;keystoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
241 &quot;keyPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided key. For the self-signed certificate, this password is generated by Dataproc.
242 },
243 },
244 &quot;initializationActions&quot;: [ # 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&#x27;s role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):
245 # ROLE=$(curl -H Metadata-Flavor:Google
246 # http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
247 # if [[ &quot;${ROLE}&quot; == &#x27;Master&#x27; ]]; then
248 # ... master specific actions ...
249 # else
250 # ... worker specific actions ...
251 # fi
252 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
253 &quot;executionTimeout&quot;: &quot;A String&quot;, # Optional. Amount of time executable has to complete. Default is 10 minutes (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).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.
254 &quot;executableFile&quot;: &quot;A String&quot;, # Required. Cloud Storage URI of executable file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400255 },
256 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 &quot;lifecycleConfig&quot;: { # Specifies the cluster auto-delete schedule configuration. # Optional. Lifecycle setting for the cluster.
258 &quot;autoDeleteTime&quot;: &quot;A String&quot;, # Optional. The time when cluster will be auto-deleted (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
259 &quot;idleDeleteTtl&quot;: &quot;A String&quot;, # Optional. The duration to keep the cluster alive while idling (when no jobs are running). Passing this threshold will cause the cluster to be deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json).
260 &quot;autoDeleteTtl&quot;: &quot;A String&quot;, # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).
261 &quot;idleStartTime&quot;: &quot;A String&quot;, # Output only. The time when cluster became idle (most recent job finished) and became eligible for deletion due to idleness (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700262 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700263 &quot;configBucket&quot;: &quot;A String&quot;, # Optional. A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#x27;s staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Dataproc staging bucket (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
264 &quot;workerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for worker instances in a cluster.
265 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
266 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
267 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
268 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400269 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700270 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
271 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
272 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
273 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
274 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
275 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
276 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
277 # projects/[project_id]/global/images/[image-id]
278 # image-idImage family examples. Dataproc will use the most recent image from the family:
279 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
280 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
281 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
282 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
283 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
284 },
285 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
286 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
287 &quot;A String&quot;,
288 ],
289 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
290 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
291 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
292 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
293 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
294 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
295 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
296 },
297 ],
298 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
299 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &quot;gceClusterConfig&quot;: { # Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster. # Optional. The shared Compute Engine config settings for all instances in a cluster.
302 &quot;zoneUri&quot;: &quot;A String&quot;, # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the &quot;global&quot; region. If omitted in a non-global Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:
303 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]
304 # projects/[project_id]/zones/[zone]
305 # us-central1-f
306 &quot;internalIpOnly&quot;: True or False, # Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.
307 &quot;metadata&quot;: { # The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
308 &quot;a_key&quot;: &quot;A String&quot;,
309 },
310 &quot;serviceAccountScopes&quot;: [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included:
311 # https://www.googleapis.com/auth/cloud.useraccounts.readonly
312 # https://www.googleapis.com/auth/devstorage.read_write
313 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:
314 # https://www.googleapis.com/auth/bigquery
315 # https://www.googleapis.com/auth/bigtable.admin.table
316 # https://www.googleapis.com/auth/bigtable.data
317 # https://www.googleapis.com/auth/devstorage.full_control
318 &quot;A String&quot;,
319 ],
320 &quot;reservationAffinity&quot;: { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation.
321 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of reservation resource.
322 &quot;values&quot;: [ # Optional. Corresponds to the label values of reservation resource.
323 &quot;A String&quot;,
324 ],
325 &quot;consumeReservationType&quot;: &quot;A String&quot;, # Optional. Type of reservation to consume
326 },
327 &quot;tags&quot;: [ # The Compute Engine tags to add to all instances (see Tagging instances (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
328 &quot;A String&quot;,
329 ],
330 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The Dataproc service account (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_dataproc) (also see VM Data Plane identity (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) used by Dataproc cluster VM instances to access Google Cloud Platform services.If not specified, the Compute Engine default service account (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
331 &quot;subnetworkUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:
332 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0
333 # projects/[project_id]/regions/us-east1/subnetworks/sub0
334 # sub0
335 &quot;networkUri&quot;: &quot;A String&quot;, # Optional. The 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 &quot;default&quot; network of the project is used, if it exists. Cannot be a &quot;Custom Subnet Network&quot; (see Using Subnetworks (https://cloud.google.com/compute/docs/subnetworks) for more information).A full URL, partial URI, or short name are valid. Examples:
336 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default
337 # projects/[project_id]/regions/global/default
338 # default
339 },
340 &quot;softwareConfig&quot;: { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster.
341 &quot;imageVersion&quot;: &quot;A String&quot;, # Optional. The version of software inside the cluster. It must be one of the supported Dataproc Versions (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), such as &quot;1.2&quot; (including a subminor version, such as &quot;1.2.29&quot;), or the &quot;preview&quot; version (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). If unspecified, it defaults to the latest Debian version.
342 &quot;properties&quot;: { # Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, for example core:hadoop.tmp.dir. The following are supported prefixes and their mappings:
343 # capacity-scheduler: capacity-scheduler.xml
344 # core: core-site.xml
345 # distcp: distcp-default.xml
346 # hdfs: hdfs-site.xml
347 # hive: hive-site.xml
348 # mapred: mapred-site.xml
349 # pig: pig.properties
350 # spark: spark-defaults.conf
351 # yarn: yarn-site.xmlFor more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
352 &quot;a_key&quot;: &quot;A String&quot;,
353 },
354 &quot;optionalComponents&quot;: [ # Optional. The set of components to activate on the cluster.
355 &quot;A String&quot;,
356 ],
357 },
358 &quot;autoscalingConfig&quot;: { # Autoscaling Policy config associated with the cluster. # Optional. Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset.
359 &quot;policyUri&quot;: &quot;A String&quot;, # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples:
360 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]
361 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Dataproc region.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400362 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800363 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700364 }
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800365
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 requestId: string, Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800367 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400368 Allowed values
369 1 - v1 error format
370 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800371
372Returns:
373 An object of the form:
374
375 { # This resource represents a long-running operation that is the result of a network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 &quot;done&quot;: 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.
377 &quot;response&quot;: { # 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.
378 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800379 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 &quot;name&quot;: &quot;A String&quot;, # 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 be a resource name ending with operations/{unique_id}.
381 &quot;error&quot;: { # 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). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
382 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
383 &quot;message&quot;: &quot;A String&quot;, # 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.
384 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800385 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800387 },
388 ],
389 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700390 &quot;metadata&quot;: { # 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.
391 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700392 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800393 }</pre>
394</div>
395
396<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 <code class="details" id="delete">delete(projectId, region, clusterName, clusterUuid=None, requestId=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 <pre>Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800399
400Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400401 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700402 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400403 clusterName: string, Required. The cluster name. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700404 clusterUuid: string, Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.
405 requestId: string, Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800406 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400407 Allowed values
408 1 - v1 error format
409 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800410
411Returns:
412 An object of the form:
413
414 { # This resource represents a long-running operation that is the result of a network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;done&quot;: 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.
416 &quot;response&quot;: { # 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.
417 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800418 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700419 &quot;name&quot;: &quot;A String&quot;, # 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 be a resource name ending with operations/{unique_id}.
420 &quot;error&quot;: { # 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). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
421 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
422 &quot;message&quot;: &quot;A String&quot;, # 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.
423 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800424 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700425 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800426 },
427 ],
428 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700429 &quot;metadata&quot;: { # 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.
430 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700431 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800432 }</pre>
433</div>
434
435<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 <code class="details" id="diagnose">diagnose(projectId, region, clusterName, body=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700437 <pre>Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). After the operation completes, Operation.response contains DiagnoseClusterResults (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800438
439Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400440 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400442 clusterName: string, Required. The cluster name. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800444 The object takes the form of:
445
446{ # A request to collect cluster diagnostic information.
447 }
448
449 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400450 Allowed values
451 1 - v1 error format
452 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800453
454Returns:
455 An object of the form:
456
457 { # This resource represents a long-running operation that is the result of a network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 &quot;done&quot;: 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.
459 &quot;response&quot;: { # 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.
460 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800461 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700462 &quot;name&quot;: &quot;A String&quot;, # 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 be a resource name ending with operations/{unique_id}.
463 &quot;error&quot;: { # 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). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
464 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
465 &quot;message&quot;: &quot;A String&quot;, # 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.
466 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800467 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700468 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800469 },
470 ],
471 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 &quot;metadata&quot;: { # 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.
473 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800475 }</pre>
476</div>
477
478<div class="method">
479 <code class="details" id="get">get(projectId, region, clusterName, x__xgafv=None)</code>
480 <pre>Gets the resource representation for a cluster in a project.
481
482Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400483 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700484 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400485 clusterName: string, Required. The cluster name. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800486 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400487 Allowed values
488 1 - v1 error format
489 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800490
491Returns:
492 An object of the form:
493
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 { # Describes the identifying information, config, and status of a cluster of Compute Engine instances.
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
496 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.
497 &quot;projectId&quot;: &quot;A String&quot;, # Required. The Google Cloud Platform project ID that the cluster belongs to.
498 &quot;labels&quot;: { # Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.
499 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800500 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700501 &quot;metrics&quot;: { # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. # Output only. Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
502 &quot;hdfsMetrics&quot;: { # The HDFS metrics.
503 &quot;a_key&quot;: &quot;A String&quot;,
504 },
505 &quot;yarnMetrics&quot;: { # The YARN metrics.
506 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800507 },
508 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 &quot;status&quot;: { # The status of a cluster and its instances. # Output only. Cluster status.
510 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
511 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
512 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
513 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800514 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;statusHistory&quot;: [ # Output only. The previous cluster status.
516 { # The status of a cluster and its instances.
517 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
518 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
519 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
520 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800521 },
522 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700523 &quot;config&quot;: { # The cluster config. # Required. The cluster config. Note that Dataproc may set default values, and values may change when clusters are updated.
524 &quot;masterConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for the master instance in a cluster.
525 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
526 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
527 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
528 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
529 },
530 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
531 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
532 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
533 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
534 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
535 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
536 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
537 # projects/[project_id]/global/images/[image-id]
538 # image-idImage family examples. Dataproc will use the most recent image from the family:
539 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
540 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
541 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
542 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
543 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
544 },
545 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
546 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
547 &quot;A String&quot;,
548 ],
549 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
550 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
551 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
552 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
553 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
554 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
555 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
556 },
557 ],
558 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
559 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
560 },
561 &quot;secondaryWorkerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for additional worker instances in a cluster.
562 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
563 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
564 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
565 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
566 },
567 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
568 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
569 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
570 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
571 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
572 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
573 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
574 # projects/[project_id]/global/images/[image-id]
575 # image-idImage family examples. Dataproc will use the most recent image from the family:
576 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
577 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
578 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
579 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
580 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
581 },
582 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
583 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
584 &quot;A String&quot;,
585 ],
586 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
587 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
588 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
589 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
590 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
591 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
592 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
593 },
594 ],
595 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
596 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
597 },
598 &quot;encryptionConfig&quot;: { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster.
599 &quot;gcePdKmsKeyName&quot;: &quot;A String&quot;, # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster.
600 },
601 &quot;securityConfig&quot;: { # Security related configuration, including Kerberos. # Optional. Security settings for the cluster.
602 &quot;kerberosConfig&quot;: { # Specifies Kerberos related configuration. # Kerberos related configuration.
603 &quot;keystorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided keystore. For the self-signed certificate, this password is generated by Dataproc.
604 &quot;crossRealmTrustAdminServer&quot;: &quot;A String&quot;, # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
605 &quot;kdcDbKeyUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database.
606 &quot;truststorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided truststore. For the self-signed certificate, this password is generated by Dataproc.
607 &quot;realm&quot;: &quot;A String&quot;, # Optional. The name of the on-cluster Kerberos realm. If not specified, the uppercased domain of hostnames will be the realm.
608 &quot;enableKerberos&quot;: True or False, # Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set this field to true to enable Kerberos on a cluster.
609 &quot;truststoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
610 &quot;crossRealmTrustRealm&quot;: &quot;A String&quot;, # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust.
611 &quot;rootPrincipalPasswordUri&quot;: &quot;A String&quot;, # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password.
612 &quot;kmsKeyUri&quot;: &quot;A String&quot;, # Required. The uri of the KMS key used to encrypt various sensitive files.
613 &quot;crossRealmTrustKdc&quot;: &quot;A String&quot;, # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
614 &quot;crossRealmTrustSharedPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the shared password between the on-cluster Kerberos realm and the remote trusted realm, in a cross realm trust relationship.
615 &quot;tgtLifetimeHours&quot;: 42, # Optional. The lifetime of the ticket granting ticket, in hours. If not specified, or user specifies 0, then default value 10 will be used.
616 &quot;keystoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
617 &quot;keyPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided key. For the self-signed certificate, this password is generated by Dataproc.
618 },
619 },
620 &quot;initializationActions&quot;: [ # 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&#x27;s role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):
621 # ROLE=$(curl -H Metadata-Flavor:Google
622 # http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
623 # if [[ &quot;${ROLE}&quot; == &#x27;Master&#x27; ]]; then
624 # ... master specific actions ...
625 # else
626 # ... worker specific actions ...
627 # fi
628 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
629 &quot;executionTimeout&quot;: &quot;A String&quot;, # Optional. Amount of time executable has to complete. Default is 10 minutes (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).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.
630 &quot;executableFile&quot;: &quot;A String&quot;, # Required. Cloud Storage URI of executable file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400631 },
632 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;lifecycleConfig&quot;: { # Specifies the cluster auto-delete schedule configuration. # Optional. Lifecycle setting for the cluster.
634 &quot;autoDeleteTime&quot;: &quot;A String&quot;, # Optional. The time when cluster will be auto-deleted (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
635 &quot;idleDeleteTtl&quot;: &quot;A String&quot;, # Optional. The duration to keep the cluster alive while idling (when no jobs are running). Passing this threshold will cause the cluster to be deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json).
636 &quot;autoDeleteTtl&quot;: &quot;A String&quot;, # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).
637 &quot;idleStartTime&quot;: &quot;A String&quot;, # Output only. The time when cluster became idle (most recent job finished) and became eligible for deletion due to idleness (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 &quot;configBucket&quot;: &quot;A String&quot;, # Optional. A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#x27;s staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Dataproc staging bucket (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
640 &quot;workerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for worker instances in a cluster.
641 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
642 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
643 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
644 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400645 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
647 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
648 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
649 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
650 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
651 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
652 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
653 # projects/[project_id]/global/images/[image-id]
654 # image-idImage family examples. Dataproc will use the most recent image from the family:
655 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
656 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
657 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
658 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
659 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
660 },
661 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
662 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
663 &quot;A String&quot;,
664 ],
665 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
666 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
667 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
668 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
669 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
670 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
671 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
672 },
673 ],
674 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
675 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700677 &quot;gceClusterConfig&quot;: { # Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster. # Optional. The shared Compute Engine config settings for all instances in a cluster.
678 &quot;zoneUri&quot;: &quot;A String&quot;, # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the &quot;global&quot; region. If omitted in a non-global Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:
679 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]
680 # projects/[project_id]/zones/[zone]
681 # us-central1-f
682 &quot;internalIpOnly&quot;: True or False, # Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.
683 &quot;metadata&quot;: { # The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
684 &quot;a_key&quot;: &quot;A String&quot;,
685 },
686 &quot;serviceAccountScopes&quot;: [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included:
687 # https://www.googleapis.com/auth/cloud.useraccounts.readonly
688 # https://www.googleapis.com/auth/devstorage.read_write
689 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:
690 # https://www.googleapis.com/auth/bigquery
691 # https://www.googleapis.com/auth/bigtable.admin.table
692 # https://www.googleapis.com/auth/bigtable.data
693 # https://www.googleapis.com/auth/devstorage.full_control
694 &quot;A String&quot;,
695 ],
696 &quot;reservationAffinity&quot;: { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation.
697 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of reservation resource.
698 &quot;values&quot;: [ # Optional. Corresponds to the label values of reservation resource.
699 &quot;A String&quot;,
700 ],
701 &quot;consumeReservationType&quot;: &quot;A String&quot;, # Optional. Type of reservation to consume
702 },
703 &quot;tags&quot;: [ # The Compute Engine tags to add to all instances (see Tagging instances (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
704 &quot;A String&quot;,
705 ],
706 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The Dataproc service account (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_dataproc) (also see VM Data Plane identity (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) used by Dataproc cluster VM instances to access Google Cloud Platform services.If not specified, the Compute Engine default service account (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
707 &quot;subnetworkUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:
708 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0
709 # projects/[project_id]/regions/us-east1/subnetworks/sub0
710 # sub0
711 &quot;networkUri&quot;: &quot;A String&quot;, # Optional. The 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 &quot;default&quot; network of the project is used, if it exists. Cannot be a &quot;Custom Subnet Network&quot; (see Using Subnetworks (https://cloud.google.com/compute/docs/subnetworks) for more information).A full URL, partial URI, or short name are valid. Examples:
712 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default
713 # projects/[project_id]/regions/global/default
714 # default
715 },
716 &quot;softwareConfig&quot;: { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster.
717 &quot;imageVersion&quot;: &quot;A String&quot;, # Optional. The version of software inside the cluster. It must be one of the supported Dataproc Versions (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), such as &quot;1.2&quot; (including a subminor version, such as &quot;1.2.29&quot;), or the &quot;preview&quot; version (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). If unspecified, it defaults to the latest Debian version.
718 &quot;properties&quot;: { # Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, for example core:hadoop.tmp.dir. The following are supported prefixes and their mappings:
719 # capacity-scheduler: capacity-scheduler.xml
720 # core: core-site.xml
721 # distcp: distcp-default.xml
722 # hdfs: hdfs-site.xml
723 # hive: hive-site.xml
724 # mapred: mapred-site.xml
725 # pig: pig.properties
726 # spark: spark-defaults.conf
727 # yarn: yarn-site.xmlFor more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
728 &quot;a_key&quot;: &quot;A String&quot;,
729 },
730 &quot;optionalComponents&quot;: [ # Optional. The set of components to activate on the cluster.
731 &quot;A String&quot;,
732 ],
733 },
734 &quot;autoscalingConfig&quot;: { # Autoscaling Policy config associated with the cluster. # Optional. Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset.
735 &quot;policyUri&quot;: &quot;A String&quot;, # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples:
736 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]
737 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Dataproc region.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400738 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800739 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 }</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800741</div>
742
743<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
745 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800746
747Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700748 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required)
749 body: object, The request body.
750 The object takes the form of:
751
752{ # Request message for GetIamPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy. This field is only used by Cloud IAM.
754 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 }
757
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800758 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400759 Allowed values
760 1 - v1 error format
761 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800762
763Returns:
764 An object of the form:
765
Dan O'Mearadd494642020-05-01 07:42:23 -0700766 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.Optionally, a binding can specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both.JSON example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700767 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700768 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
771 # &quot;members&quot;: [
772 # &quot;user:mike@example.com&quot;,
773 # &quot;group:admins@example.com&quot;,
774 # &quot;domain:google.com&quot;,
775 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776 # ]
777 # },
778 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
780 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
781 # &quot;condition&quot;: {
782 # &quot;title&quot;: &quot;expirable access&quot;,
783 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
784 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700785 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700787 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
789 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700791 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792 # bindings:
793 # - members:
794 # - user:mike@example.com
795 # - group:admins@example.com
796 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700797 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
798 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 # - user:eve@example.com
801 # role: roles/resourcemanager.organizationViewer
802 # condition:
803 # title: expirable access
804 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700805 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 # - etag: BwWWja0YfJA=
807 # - version: 3
808 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 &quot;bindings&quot;: [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 { # Associates members with a role.
Bu Sun Kim65020912020-05-20 12:08:20 -0700811 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
812 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
813 # title: &quot;Summary size limit&quot;
814 # description: &quot;Determines if a summary is less than 100 chars&quot;
815 # expression: &quot;document.summary.size() &lt; 100&quot;
816 # Example (Equality):
817 # title: &quot;Requestor is owner&quot;
818 # description: &quot;Determines if requestor is the document owner&quot;
819 # expression: &quot;document.owner == request.auth.claims.email&quot;
820 # Example (Logic):
821 # title: &quot;Public documents&quot;
822 # description: &quot;Determine whether the document should be publicly visible&quot;
823 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
824 # Example (Data Manipulation):
825 # title: &quot;Notification string&quot;
826 # description: &quot;Create a notification string with a timestamp.&quot;
827 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
828 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
829 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
830 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
831 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
832 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
833 },
834 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
836 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700838 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
839 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -0700840 # deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding.
841 # deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding.
842 # deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700843 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
Bu Sun Kim65020912020-05-20 12:08:20 -0700844 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700846 },
847 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &quot;etag&quot;: &quot;A String&quot;, # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
849 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
Dan O'Mearadd494642020-05-01 07:42:23 -0700850 # Getting a policy that includes a conditional role binding
851 # Adding a conditional role binding to a policy
852 # Changing a conditional role binding in a policy
853 # Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700854 }</pre>
855</div>
856
857<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 <code class="details" id="list">list(projectId, region, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 <pre>Lists all regions/{region}/clusters in a project alphabetically.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700860
861Args:
862 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700863 region: string, Required. The Dataproc region in which to handle the request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 pageToken: string, Optional. The standard List page token.
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 pageSize: integer, Optional. The standard List page size.
866 filter: string, Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700867 x__xgafv: string, V1 error format.
868 Allowed values
869 1 - v1 error format
870 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871
872Returns:
873 An object of the form:
874
875 { # The list of all clusters in a project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &quot;clusters&quot;: [ # Output only. The clusters in the project.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700877 { # Describes the identifying information, config, and status of a cluster of Compute Engine instances.
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
879 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.
880 &quot;projectId&quot;: &quot;A String&quot;, # Required. The Google Cloud Platform project ID that the cluster belongs to.
881 &quot;labels&quot;: { # Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.
882 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800883 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700884 &quot;metrics&quot;: { # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. # Output only. Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
885 &quot;hdfsMetrics&quot;: { # The HDFS metrics.
886 &quot;a_key&quot;: &quot;A String&quot;,
887 },
888 &quot;yarnMetrics&quot;: { # The YARN metrics.
889 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800890 },
891 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700892 &quot;status&quot;: { # The status of a cluster and its instances. # Output only. Cluster status.
893 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
894 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
895 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
896 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800897 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700898 &quot;statusHistory&quot;: [ # Output only. The previous cluster status.
899 { # The status of a cluster and its instances.
900 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
901 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
902 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
903 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800904 },
905 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &quot;config&quot;: { # The cluster config. # Required. The cluster config. Note that Dataproc may set default values, and values may change when clusters are updated.
907 &quot;masterConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for the master instance in a cluster.
908 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
909 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
910 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
911 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
912 },
913 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
914 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
915 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
916 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
917 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
918 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
919 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
920 # projects/[project_id]/global/images/[image-id]
921 # image-idImage family examples. Dataproc will use the most recent image from the family:
922 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
923 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
924 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
925 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
926 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
927 },
928 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
929 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
930 &quot;A String&quot;,
931 ],
932 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
933 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
934 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
935 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
936 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
937 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
938 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
939 },
940 ],
941 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
942 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
943 },
944 &quot;secondaryWorkerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for additional worker instances in a cluster.
945 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
946 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
947 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
948 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
949 },
950 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
951 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
952 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
953 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
954 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
955 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
956 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
957 # projects/[project_id]/global/images/[image-id]
958 # image-idImage family examples. Dataproc will use the most recent image from the family:
959 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
960 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
961 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
962 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
963 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
964 },
965 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
966 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
967 &quot;A String&quot;,
968 ],
969 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
970 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
971 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
972 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
973 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
974 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
975 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
976 },
977 ],
978 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
979 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
980 },
981 &quot;encryptionConfig&quot;: { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster.
982 &quot;gcePdKmsKeyName&quot;: &quot;A String&quot;, # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster.
983 },
984 &quot;securityConfig&quot;: { # Security related configuration, including Kerberos. # Optional. Security settings for the cluster.
985 &quot;kerberosConfig&quot;: { # Specifies Kerberos related configuration. # Kerberos related configuration.
986 &quot;keystorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided keystore. For the self-signed certificate, this password is generated by Dataproc.
987 &quot;crossRealmTrustAdminServer&quot;: &quot;A String&quot;, # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
988 &quot;kdcDbKeyUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database.
989 &quot;truststorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided truststore. For the self-signed certificate, this password is generated by Dataproc.
990 &quot;realm&quot;: &quot;A String&quot;, # Optional. The name of the on-cluster Kerberos realm. If not specified, the uppercased domain of hostnames will be the realm.
991 &quot;enableKerberos&quot;: True or False, # Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set this field to true to enable Kerberos on a cluster.
992 &quot;truststoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
993 &quot;crossRealmTrustRealm&quot;: &quot;A String&quot;, # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust.
994 &quot;rootPrincipalPasswordUri&quot;: &quot;A String&quot;, # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password.
995 &quot;kmsKeyUri&quot;: &quot;A String&quot;, # Required. The uri of the KMS key used to encrypt various sensitive files.
996 &quot;crossRealmTrustKdc&quot;: &quot;A String&quot;, # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
997 &quot;crossRealmTrustSharedPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the shared password between the on-cluster Kerberos realm and the remote trusted realm, in a cross realm trust relationship.
998 &quot;tgtLifetimeHours&quot;: 42, # Optional. The lifetime of the ticket granting ticket, in hours. If not specified, or user specifies 0, then default value 10 will be used.
999 &quot;keystoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
1000 &quot;keyPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided key. For the self-signed certificate, this password is generated by Dataproc.
1001 },
1002 },
1003 &quot;initializationActions&quot;: [ # 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&#x27;s role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):
1004 # ROLE=$(curl -H Metadata-Flavor:Google
1005 # http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
1006 # if [[ &quot;${ROLE}&quot; == &#x27;Master&#x27; ]]; then
1007 # ... master specific actions ...
1008 # else
1009 # ... worker specific actions ...
1010 # fi
1011 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
1012 &quot;executionTimeout&quot;: &quot;A String&quot;, # Optional. Amount of time executable has to complete. Default is 10 minutes (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).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.
1013 &quot;executableFile&quot;: &quot;A String&quot;, # Required. Cloud Storage URI of executable file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001014 },
1015 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 &quot;lifecycleConfig&quot;: { # Specifies the cluster auto-delete schedule configuration. # Optional. Lifecycle setting for the cluster.
1017 &quot;autoDeleteTime&quot;: &quot;A String&quot;, # Optional. The time when cluster will be auto-deleted (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
1018 &quot;idleDeleteTtl&quot;: &quot;A String&quot;, # Optional. The duration to keep the cluster alive while idling (when no jobs are running). Passing this threshold will cause the cluster to be deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json).
1019 &quot;autoDeleteTtl&quot;: &quot;A String&quot;, # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).
1020 &quot;idleStartTime&quot;: &quot;A String&quot;, # Output only. The time when cluster became idle (most recent job finished) and became eligible for deletion due to idleness (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001021 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;configBucket&quot;: &quot;A String&quot;, # Optional. A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#x27;s staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Dataproc staging bucket (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
1023 &quot;workerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for worker instances in a cluster.
1024 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
1025 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
1026 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
1027 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001028 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
1030 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
1031 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1032 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1033 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
1034 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
1035 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
1036 # projects/[project_id]/global/images/[image-id]
1037 # image-idImage family examples. Dataproc will use the most recent image from the family:
1038 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
1039 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
1040 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
1041 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
1042 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
1043 },
1044 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
1045 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
1046 &quot;A String&quot;,
1047 ],
1048 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
1049 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
1050 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
1051 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
1052 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1053 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1054 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
1055 },
1056 ],
1057 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
1058 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;gceClusterConfig&quot;: { # Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster. # Optional. The shared Compute Engine config settings for all instances in a cluster.
1061 &quot;zoneUri&quot;: &quot;A String&quot;, # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the &quot;global&quot; region. If omitted in a non-global Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:
1062 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]
1063 # projects/[project_id]/zones/[zone]
1064 # us-central1-f
1065 &quot;internalIpOnly&quot;: True or False, # Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.
1066 &quot;metadata&quot;: { # The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
1067 &quot;a_key&quot;: &quot;A String&quot;,
1068 },
1069 &quot;serviceAccountScopes&quot;: [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included:
1070 # https://www.googleapis.com/auth/cloud.useraccounts.readonly
1071 # https://www.googleapis.com/auth/devstorage.read_write
1072 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:
1073 # https://www.googleapis.com/auth/bigquery
1074 # https://www.googleapis.com/auth/bigtable.admin.table
1075 # https://www.googleapis.com/auth/bigtable.data
1076 # https://www.googleapis.com/auth/devstorage.full_control
1077 &quot;A String&quot;,
1078 ],
1079 &quot;reservationAffinity&quot;: { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation.
1080 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of reservation resource.
1081 &quot;values&quot;: [ # Optional. Corresponds to the label values of reservation resource.
1082 &quot;A String&quot;,
1083 ],
1084 &quot;consumeReservationType&quot;: &quot;A String&quot;, # Optional. Type of reservation to consume
1085 },
1086 &quot;tags&quot;: [ # The Compute Engine tags to add to all instances (see Tagging instances (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
1087 &quot;A String&quot;,
1088 ],
1089 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The Dataproc service account (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_dataproc) (also see VM Data Plane identity (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) used by Dataproc cluster VM instances to access Google Cloud Platform services.If not specified, the Compute Engine default service account (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
1090 &quot;subnetworkUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:
1091 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0
1092 # projects/[project_id]/regions/us-east1/subnetworks/sub0
1093 # sub0
1094 &quot;networkUri&quot;: &quot;A String&quot;, # Optional. The 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 &quot;default&quot; network of the project is used, if it exists. Cannot be a &quot;Custom Subnet Network&quot; (see Using Subnetworks (https://cloud.google.com/compute/docs/subnetworks) for more information).A full URL, partial URI, or short name are valid. Examples:
1095 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default
1096 # projects/[project_id]/regions/global/default
1097 # default
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001098 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &quot;softwareConfig&quot;: { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster.
1100 &quot;imageVersion&quot;: &quot;A String&quot;, # Optional. The version of software inside the cluster. It must be one of the supported Dataproc Versions (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), such as &quot;1.2&quot; (including a subminor version, such as &quot;1.2.29&quot;), or the &quot;preview&quot; version (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). If unspecified, it defaults to the latest Debian version.
1101 &quot;properties&quot;: { # Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, for example core:hadoop.tmp.dir. The following are supported prefixes and their mappings:
1102 # capacity-scheduler: capacity-scheduler.xml
1103 # core: core-site.xml
1104 # distcp: distcp-default.xml
1105 # hdfs: hdfs-site.xml
1106 # hive: hive-site.xml
1107 # mapred: mapred-site.xml
1108 # pig: pig.properties
1109 # spark: spark-defaults.conf
1110 # yarn: yarn-site.xmlFor more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
1111 &quot;a_key&quot;: &quot;A String&quot;,
1112 },
1113 &quot;optionalComponents&quot;: [ # Optional. The set of components to activate on the cluster.
1114 &quot;A String&quot;,
1115 ],
1116 },
1117 &quot;autoscalingConfig&quot;: { # Autoscaling Policy config associated with the cluster. # Optional. Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset.
1118 &quot;policyUri&quot;: &quot;A String&quot;, # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples:
1119 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]
1120 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Dataproc region.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001121 },
1122 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001123 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001124 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;nextPageToken&quot;: &quot;A String&quot;, # Output only. 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 -08001126 }</pre>
1127</div>
1128
1129<div class="method">
1130 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1131 <pre>Retrieves the next page of results.
1132
1133Args:
1134 previous_request: The request for the previous page. (required)
1135 previous_response: The response from the request for the previous page. (required)
1136
1137Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001138 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001139 page. Returns None if there are no more items in the collection.
1140 </pre>
1141</div>
1142
1143<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001144 <code class="details" id="patch">patch(projectId, region, clusterName, body=None, gracefulDecommissionTimeout=None, requestId=None, updateMask=None, x__xgafv=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07001145 <pre>Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001146
1147Args:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001148 projectId: string, Required. The ID of the Google Cloud Platform project the cluster belongs to. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001149 region: string, Required. The Dataproc region in which to handle the request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001150 clusterName: string, Required. The cluster name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001151 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001152 The object takes the form of:
1153
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154{ # Describes the identifying information, config, and status of a cluster of Compute Engine instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 &quot;clusterName&quot;: &quot;A String&quot;, # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.
1156 &quot;clusterUuid&quot;: &quot;A String&quot;, # Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.
1157 &quot;projectId&quot;: &quot;A String&quot;, # Required. The Google Cloud Platform project ID that the cluster belongs to.
1158 &quot;labels&quot;: { # Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.
1159 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001160 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001161 &quot;metrics&quot;: { # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. # Output only. Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.
1162 &quot;hdfsMetrics&quot;: { # The HDFS metrics.
1163 &quot;a_key&quot;: &quot;A String&quot;,
1164 },
1165 &quot;yarnMetrics&quot;: { # The YARN metrics.
1166 &quot;a_key&quot;: &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001167 },
1168 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 &quot;status&quot;: { # The status of a cluster and its instances. # Output only. Cluster status.
1170 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
1171 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
1172 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
1173 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001174 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001175 &quot;statusHistory&quot;: [ # Output only. The previous cluster status.
1176 { # The status of a cluster and its instances.
1177 &quot;detail&quot;: &quot;A String&quot;, # Optional. Output only. Details of cluster&#x27;s state.
1178 &quot;state&quot;: &quot;A String&quot;, # Output only. The cluster&#x27;s state.
1179 &quot;stateStartTime&quot;: &quot;A String&quot;, # Output only. Time when this state was entered (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
1180 &quot;substate&quot;: &quot;A String&quot;, # Output only. Additional state information that includes status reported by the agent.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001181 },
1182 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001183 &quot;config&quot;: { # The cluster config. # Required. The cluster config. Note that Dataproc may set default values, and values may change when clusters are updated.
1184 &quot;masterConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for the master instance in a cluster.
1185 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
1186 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
1187 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
1188 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
1189 },
1190 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
1191 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
1192 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1193 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1194 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
1195 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
1196 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
1197 # projects/[project_id]/global/images/[image-id]
1198 # image-idImage family examples. Dataproc will use the most recent image from the family:
1199 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
1200 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
1201 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
1202 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
1203 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
1204 },
1205 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
1206 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
1207 &quot;A String&quot;,
1208 ],
1209 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
1210 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
1211 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
1212 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
1213 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1214 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1215 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
1216 },
1217 ],
1218 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
1219 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
1220 },
1221 &quot;secondaryWorkerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for additional worker instances in a cluster.
1222 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
1223 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
1224 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
1225 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
1226 },
1227 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
1228 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
1229 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1230 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1231 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
1232 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
1233 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
1234 # projects/[project_id]/global/images/[image-id]
1235 # image-idImage family examples. Dataproc will use the most recent image from the family:
1236 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
1237 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
1238 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
1239 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
1240 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
1241 },
1242 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
1243 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
1244 &quot;A String&quot;,
1245 ],
1246 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
1247 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
1248 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
1249 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
1250 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1251 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1252 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
1253 },
1254 ],
1255 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
1256 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
1257 },
1258 &quot;encryptionConfig&quot;: { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster.
1259 &quot;gcePdKmsKeyName&quot;: &quot;A String&quot;, # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster.
1260 },
1261 &quot;securityConfig&quot;: { # Security related configuration, including Kerberos. # Optional. Security settings for the cluster.
1262 &quot;kerberosConfig&quot;: { # Specifies Kerberos related configuration. # Kerberos related configuration.
1263 &quot;keystorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided keystore. For the self-signed certificate, this password is generated by Dataproc.
1264 &quot;crossRealmTrustAdminServer&quot;: &quot;A String&quot;, # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
1265 &quot;kdcDbKeyUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database.
1266 &quot;truststorePasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided truststore. For the self-signed certificate, this password is generated by Dataproc.
1267 &quot;realm&quot;: &quot;A String&quot;, # Optional. The name of the on-cluster Kerberos realm. If not specified, the uppercased domain of hostnames will be the realm.
1268 &quot;enableKerberos&quot;: True or False, # Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set this field to true to enable Kerberos on a cluster.
1269 &quot;truststoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
1270 &quot;crossRealmTrustRealm&quot;: &quot;A String&quot;, # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust.
1271 &quot;rootPrincipalPasswordUri&quot;: &quot;A String&quot;, # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password.
1272 &quot;kmsKeyUri&quot;: &quot;A String&quot;, # Required. The uri of the KMS key used to encrypt various sensitive files.
1273 &quot;crossRealmTrustKdc&quot;: &quot;A String&quot;, # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship.
1274 &quot;crossRealmTrustSharedPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the shared password between the on-cluster Kerberos realm and the remote trusted realm, in a cross realm trust relationship.
1275 &quot;tgtLifetimeHours&quot;: 42, # Optional. The lifetime of the ticket granting ticket, in hours. If not specified, or user specifies 0, then default value 10 will be used.
1276 &quot;keystoreUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate.
1277 &quot;keyPasswordUri&quot;: &quot;A String&quot;, # Optional. The Cloud Storage URI of a KMS encrypted file containing the password to the user provided key. For the self-signed certificate, this password is generated by Dataproc.
1278 },
1279 },
1280 &quot;initializationActions&quot;: [ # 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&#x27;s role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):
1281 # ROLE=$(curl -H Metadata-Flavor:Google
1282 # http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
1283 # if [[ &quot;${ROLE}&quot; == &#x27;Master&#x27; ]]; then
1284 # ... master specific actions ...
1285 # else
1286 # ... worker specific actions ...
1287 # fi
1288 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion.
1289 &quot;executionTimeout&quot;: &quot;A String&quot;, # Optional. Amount of time executable has to complete. Default is 10 minutes (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).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.
1290 &quot;executableFile&quot;: &quot;A String&quot;, # Required. Cloud Storage URI of executable file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001291 },
1292 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001293 &quot;lifecycleConfig&quot;: { # Specifies the cluster auto-delete schedule configuration. # Optional. Lifecycle setting for the cluster.
1294 &quot;autoDeleteTime&quot;: &quot;A String&quot;, # Optional. The time when cluster will be auto-deleted (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
1295 &quot;idleDeleteTtl&quot;: &quot;A String&quot;, # Optional. The duration to keep the cluster alive while idling (when no jobs are running). Passing this threshold will cause the cluster to be deleted. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json).
1296 &quot;autoDeleteTtl&quot;: &quot;A String&quot;, # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Minimum value is 10 minutes; maximum value is 14 days (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).
1297 &quot;idleStartTime&quot;: &quot;A String&quot;, # Output only. The time when cluster became idle (most recent job finished) and became eligible for deletion due to idleness (see JSON representation of Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001299 &quot;configBucket&quot;: &quot;A String&quot;, # Optional. A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#x27;s staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Dataproc staging bucket (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
1300 &quot;workerConfig&quot;: { # The config settings for Compute Engine resources in an instance group, such as a master or worker group. # Optional. The Compute Engine config settings for worker instances in a cluster.
1301 &quot;diskConfig&quot;: { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings.
1302 &quot;bootDiskType&quot;: &quot;A String&quot;, # Optional. Type of the boot disk (default is &quot;pd-standard&quot;). Valid values: &quot;pd-ssd&quot; (Persistent Disk Solid State Drive) or &quot;pd-standard&quot; (Persistent Disk Hard Disk Drive).
1303 &quot;numLocalSsds&quot;: 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 (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) 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.
1304 &quot;bootDiskSizeGb&quot;: 42, # Optional. Size in GB of the boot disk (default is 500GB).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001305 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001306 &quot;preemptibility&quot;: &quot;A String&quot;, # Optional. Specifies the preemptibility of the instance group.The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.The default value for secondary instances is PREEMPTIBLE.
1307 &quot;machineTypeUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:
1308 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1309 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1310 # n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example, n1-standard-2.
1311 &quot;imageUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine image resource used for cluster instances.The URI can represent an image or image family.Image examples:
1312 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
1313 # projects/[project_id]/global/images/[image-id]
1314 # image-idImage family examples. Dataproc will use the most recent image from the family:
1315 # https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
1316 # projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.
1317 &quot;managedGroupConfig&quot;: { # Specifies the resources used to actively manage an instance group. # Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
1318 &quot;instanceGroupManagerName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Group Manager for this group.
1319 &quot;instanceTemplateName&quot;: &quot;A String&quot;, # Output only. The name of the Instance Template used for the Managed Instance Group.
1320 },
1321 &quot;isPreemptible&quot;: True or False, # Output only. Specifies that this instance group contains preemptible instances.
1322 &quot;instanceNames&quot;: [ # Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.
1323 &quot;A String&quot;,
1324 ],
1325 &quot;accelerators&quot;: [ # Optional. The Compute Engine accelerator configuration for these instances.
1326 { # Specifies the type and number of accelerator cards attached to the instances of an instance. See GPUs on Compute Engine (https://cloud.google.com/compute/docs/gpus/).
1327 &quot;acceleratorCount&quot;: 42, # The number of the accelerator cards of this type exposed to this instance.
1328 &quot;acceleratorTypeUri&quot;: &quot;A String&quot;, # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).Examples:
1329 # https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1330 # projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
1331 # nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80.
1332 },
1333 ],
1334 &quot;numInstances&quot;: 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.
1335 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -&amp;gt; Minimum CPU Platform (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001336 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001337 &quot;gceClusterConfig&quot;: { # Common config settings for resources of Compute Engine cluster instances, applicable to all instances in the cluster. # Optional. The shared Compute Engine config settings for all instances in a cluster.
1338 &quot;zoneUri&quot;: &quot;A String&quot;, # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the &quot;global&quot; region. If omitted in a non-global Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:
1339 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]
1340 # projects/[project_id]/zones/[zone]
1341 # us-central1-f
1342 &quot;internalIpOnly&quot;: True or False, # Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.
1343 &quot;metadata&quot;: { # The Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
1344 &quot;a_key&quot;: &quot;A String&quot;,
1345 },
1346 &quot;serviceAccountScopes&quot;: [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included:
1347 # https://www.googleapis.com/auth/cloud.useraccounts.readonly
1348 # https://www.googleapis.com/auth/devstorage.read_write
1349 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:
1350 # https://www.googleapis.com/auth/bigquery
1351 # https://www.googleapis.com/auth/bigtable.admin.table
1352 # https://www.googleapis.com/auth/bigtable.data
1353 # https://www.googleapis.com/auth/devstorage.full_control
1354 &quot;A String&quot;,
1355 ],
1356 &quot;reservationAffinity&quot;: { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation.
1357 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of reservation resource.
1358 &quot;values&quot;: [ # Optional. Corresponds to the label values of reservation resource.
1359 &quot;A String&quot;,
1360 ],
1361 &quot;consumeReservationType&quot;: &quot;A String&quot;, # Optional. Type of reservation to consume
1362 },
1363 &quot;tags&quot;: [ # The Compute Engine tags to add to all instances (see Tagging instances (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
1364 &quot;A String&quot;,
1365 ],
1366 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The Dataproc service account (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_dataproc) (also see VM Data Plane identity (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) used by Dataproc cluster VM instances to access Google Cloud Platform services.If not specified, the Compute Engine default service account (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
1367 &quot;subnetworkUri&quot;: &quot;A String&quot;, # Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:
1368 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0
1369 # projects/[project_id]/regions/us-east1/subnetworks/sub0
1370 # sub0
1371 &quot;networkUri&quot;: &quot;A String&quot;, # Optional. The 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 &quot;default&quot; network of the project is used, if it exists. Cannot be a &quot;Custom Subnet Network&quot; (see Using Subnetworks (https://cloud.google.com/compute/docs/subnetworks) for more information).A full URL, partial URI, or short name are valid. Examples:
1372 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default
1373 # projects/[project_id]/regions/global/default
1374 # default
1375 },
1376 &quot;softwareConfig&quot;: { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster.
1377 &quot;imageVersion&quot;: &quot;A String&quot;, # Optional. The version of software inside the cluster. It must be one of the supported Dataproc Versions (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions), such as &quot;1.2&quot; (including a subminor version, such as &quot;1.2.29&quot;), or the &quot;preview&quot; version (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). If unspecified, it defaults to the latest Debian version.
1378 &quot;properties&quot;: { # Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, for example core:hadoop.tmp.dir. The following are supported prefixes and their mappings:
1379 # capacity-scheduler: capacity-scheduler.xml
1380 # core: core-site.xml
1381 # distcp: distcp-default.xml
1382 # hdfs: hdfs-site.xml
1383 # hive: hive-site.xml
1384 # mapred: mapred-site.xml
1385 # pig: pig.properties
1386 # spark: spark-defaults.conf
1387 # yarn: yarn-site.xmlFor more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
1388 &quot;a_key&quot;: &quot;A String&quot;,
1389 },
1390 &quot;optionalComponents&quot;: [ # Optional. The set of components to activate on the cluster.
1391 &quot;A String&quot;,
1392 ],
1393 },
1394 &quot;autoscalingConfig&quot;: { # Autoscaling Policy config associated with the cluster. # Optional. Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset.
1395 &quot;policyUri&quot;: &quot;A String&quot;, # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples:
1396 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]
1397 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Dataproc region.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001398 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001399 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001400 }
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001401
Dan O'Mearadd494642020-05-01 07:42:23 -07001402 gracefulDecommissionTimeout: string, Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day. (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).Only supported on Dataproc image versions 1.2 and higher.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001403 requestId: string, Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001404 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:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001405{
Bu Sun Kim65020912020-05-20 12:08:20 -07001406 &quot;config&quot;:{
1407 &quot;workerConfig&quot;:{
1408 &quot;numInstances&quot;:&quot;5&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001409 }
1410 }
1411}
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001412Similarly, 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:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001413{
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &quot;config&quot;:{
1415 &quot;secondaryWorkerConfig&quot;:{
1416 &quot;numInstances&quot;:&quot;5&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001417 }
1418 }
1419}
Dan O'Mearadd494642020-05-01 07:42:23 -07001420&lt;strong&gt;Note:&lt;/strong&gt; Currently, only the following fields can be updated:&lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Mask&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;labels&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Update labels&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;config.worker_config.num_instances&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Resize primary worker group&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;&lt;em&gt;config.secondary_worker_config.num_instances&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;Resize secondary worker group&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;config.autoscaling_config.policy_uri&lt;/td&gt;&lt;td&gt;Use, stop using, or change autoscaling policies&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
Bu Sun Kim65020912020-05-20 12:08:20 -07001421 x__xgafv: string, V1 error format.
1422 Allowed values
1423 1 - v1 error format
1424 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001425
1426Returns:
1427 An object of the form:
1428
1429 { # This resource represents a long-running operation that is the result of a network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001430 &quot;done&quot;: 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.
1431 &quot;response&quot;: { # 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.
1432 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001433 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 &quot;name&quot;: &quot;A String&quot;, # 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 be a resource name ending with operations/{unique_id}.
1435 &quot;error&quot;: { # 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). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
1436 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1437 &quot;message&quot;: &quot;A String&quot;, # 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.
1438 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001439 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001440 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001441 },
1442 ],
1443 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001444 &quot;metadata&quot;: { # 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.
1445 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001446 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001447 }</pre>
1448</div>
1449
1450<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001451 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
1452 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001453
1454Args:
1455 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001456 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001457 The object takes the form of:
1458
1459{ # Request message for SetIamPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001460 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.Optionally, a binding can specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both.JSON example: # REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001461 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001463 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001464 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1465 # &quot;members&quot;: [
1466 # &quot;user:mike@example.com&quot;,
1467 # &quot;group:admins@example.com&quot;,
1468 # &quot;domain:google.com&quot;,
1469 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001470 # ]
1471 # },
1472 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001473 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1474 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
1475 # &quot;condition&quot;: {
1476 # &quot;title&quot;: &quot;expirable access&quot;,
1477 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1478 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001479 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001480 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001481 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1483 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001484 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001485 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 # bindings:
1487 # - members:
1488 # - user:mike@example.com
1489 # - group:admins@example.com
1490 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001491 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1492 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001493 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001494 # - user:eve@example.com
1495 # role: roles/resourcemanager.organizationViewer
1496 # condition:
1497 # title: expirable access
1498 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001499 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001500 # - etag: BwWWja0YfJA=
1501 # - version: 3
1502 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001503 &quot;bindings&quot;: [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504 { # Associates members with a role.
Bu Sun Kim65020912020-05-20 12:08:20 -07001505 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
1506 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
1507 # title: &quot;Summary size limit&quot;
1508 # description: &quot;Determines if a summary is less than 100 chars&quot;
1509 # expression: &quot;document.summary.size() &lt; 100&quot;
1510 # Example (Equality):
1511 # title: &quot;Requestor is owner&quot;
1512 # description: &quot;Determines if requestor is the document owner&quot;
1513 # expression: &quot;document.owner == request.auth.claims.email&quot;
1514 # Example (Logic):
1515 # title: &quot;Public documents&quot;
1516 # description: &quot;Determine whether the document should be publicly visible&quot;
1517 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1518 # Example (Data Manipulation):
1519 # title: &quot;Notification string&quot;
1520 # description: &quot;Create a notification string with a timestamp.&quot;
1521 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1522 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1523 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1524 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1525 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1526 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1527 },
1528 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001529 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
1530 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
Dan O'Mearadd494642020-05-01 07:42:23 -07001531 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001532 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
1533 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -07001534 # deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding.
1535 # deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding.
1536 # deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001537 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
Bu Sun Kim65020912020-05-20 12:08:20 -07001538 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001539 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001540 },
1541 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001542 &quot;etag&quot;: &quot;A String&quot;, # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
1543 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
Dan O'Mearadd494642020-05-01 07:42:23 -07001544 # Getting a policy that includes a conditional role binding
1545 # Adding a conditional role binding to a policy
1546 # Changing a conditional role binding in a policy
1547 # Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001548 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001549 }
1550
1551 x__xgafv: string, V1 error format.
1552 Allowed values
1553 1 - v1 error format
1554 2 - v2 error format
1555
1556Returns:
1557 An object of the form:
1558
Dan O'Mearadd494642020-05-01 07:42:23 -07001559 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.Optionally, a binding can specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both.JSON example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001560 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001561 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001563 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1564 # &quot;members&quot;: [
1565 # &quot;user:mike@example.com&quot;,
1566 # &quot;group:admins@example.com&quot;,
1567 # &quot;domain:google.com&quot;,
1568 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001569 # ]
1570 # },
1571 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1573 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
1574 # &quot;condition&quot;: {
1575 # &quot;title&quot;: &quot;expirable access&quot;,
1576 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1577 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001578 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001579 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001580 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001581 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1582 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001583 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001584 # YAML example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001585 # bindings:
1586 # - members:
1587 # - user:mike@example.com
1588 # - group:admins@example.com
1589 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001590 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1591 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001592 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001593 # - user:eve@example.com
1594 # role: roles/resourcemanager.organizationViewer
1595 # condition:
1596 # title: expirable access
1597 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001598 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001599 # - etag: BwWWja0YfJA=
1600 # - version: 3
1601 # For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001602 &quot;bindings&quot;: [ # Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001603 { # Associates members with a role.
Bu Sun Kim65020912020-05-20 12:08:20 -07001604 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner.
1605 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
1606 # title: &quot;Summary size limit&quot;
1607 # description: &quot;Determines if a summary is less than 100 chars&quot;
1608 # expression: &quot;document.summary.size() &lt; 100&quot;
1609 # Example (Equality):
1610 # title: &quot;Requestor is owner&quot;
1611 # description: &quot;Determines if requestor is the document owner&quot;
1612 # expression: &quot;document.owner == request.auth.claims.email&quot;
1613 # Example (Logic):
1614 # title: &quot;Public documents&quot;
1615 # description: &quot;Determine whether the document should be publicly visible&quot;
1616 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1617 # Example (Data Manipulation):
1618 # title: &quot;Notification string&quot;
1619 # description: &quot;Create a notification string with a timestamp.&quot;
1620 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1621 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1622 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1623 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1624 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1625 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1626 },
1627 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001628 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.
1629 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.
Dan O'Mearadd494642020-05-01 07:42:23 -07001630 # user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001631 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
1632 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
Dan O'Mearadd494642020-05-01 07:42:23 -07001633 # deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding.
1634 # deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding.
1635 # deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001636 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
Bu Sun Kim65020912020-05-20 12:08:20 -07001637 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001638 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001639 },
1640 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001641 &quot;etag&quot;: &quot;A String&quot;, # etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
1642 &quot;version&quot;: 42, # Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
Dan O'Mearadd494642020-05-01 07:42:23 -07001643 # Getting a policy that includes a conditional role binding
1644 # Adding a conditional role binding to a policy
1645 # Changing a conditional role binding in a policy
1646 # Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001647 }</pre>
1648</div>
1649
1650<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001651 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001652 <pre>Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001653
1654Args:
1655 resource: string, REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001656 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001657 The object takes the form of:
1658
1659{ # Request message for TestIamPermissions method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001660 &quot;permissions&quot;: [ # The set of permissions to check for the resource. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
1661 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001662 ],
1663 }
1664
1665 x__xgafv: string, V1 error format.
1666 Allowed values
1667 1 - v1 error format
1668 2 - v2 error format
1669
1670Returns:
1671 An object of the form:
1672
1673 { # Response message for TestIamPermissions method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001674 &quot;permissions&quot;: [ # A subset of TestPermissionsRequest.permissions that the caller is allowed.
1675 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001676 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001677 }</pre>
1678</div>
1679
1680</body></html>