1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="dataproc_v1beta2.html">Cloud Dataproc API</a> . <a href="dataproc_v1beta2.projects.html">projects</a> . <a href="dataproc_v1beta2.projects.regions.html">regions</a> . <a href="dataproc_v1beta2.projects.regions.clusters.html">clusters</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(projectId, region, body, requestId=None, x__xgafv=None)</a></code></p> 79<p class="firstline">Creates a cluster in a project.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(projectId, region, clusterName, clusterUuid=None, requestId=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Deletes a cluster in a project.</p> 83<p class="toc_element"> 84 <code><a href="#diagnose">diagnose(projectId, region, clusterName, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(projectId, region, clusterName, x__xgafv=None)</a></code></p> 88<p class="firstline">Gets the resource representation for a cluster in a project.</p> 89<p class="toc_element"> 90 <code><a href="#getIamPolicy">getIamPolicy(resource, 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"> 93 <code><a href="#list">list(projectId, region, pageSize=None, pageToken=None, x__xgafv=None, filter=None)</a></code></p> 94<p class="firstline">Lists all regions/{region}/clusters in a project.</p> 95<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"> 99 <code><a href="#patch">patch(projectId, region, clusterName, body, x__xgafv=None, gracefulDecommissionTimeout=None, requestId=None, updateMask=None)</a></code></p> 100<p class="firstline">Updates a cluster in a project.</p> 101<p class="toc_element"> 102 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p> 103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> 104<p class="toc_element"> 105 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p> 106<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> 107<h3>Method Details</h3> 108<div class="method"> 109 <code class="details" id="create">create(projectId, region, body, requestId=None, x__xgafv=None)</code> 110 <pre>Creates a cluster in a project. 111 112Args: 113 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required) 114 region: string, Required. The Cloud Dataproc region in which to handle the request. (required) 115 body: object, The request body. (required) 116 The object takes the form of: 117 118{ # Describes the identifying information, config, and status of a cluster of Compute Engine instances. 119 "status": { # The status of a cluster and its instances. # Output only. Cluster status. 120 "state": "A String", # Output only. The cluster's state. 121 "stateStartTime": "A String", # Output only. Time when this state was entered. 122 "detail": "A String", # Output only. Optional details of cluster's state. 123 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 124 }, 125 "clusterUuid": "A String", # Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster. 126 "clusterName": "A String", # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused. 127 "projectId": "A String", # Required. The Google Cloud Platform project ID that the cluster belongs to. 128 "labels": { # 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. 129 "a_key": "A String", 130 }, 131 "metrics": { # 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. 132 "yarnMetrics": { # The YARN metrics. 133 "a_key": "A String", 134 }, 135 "hdfsMetrics": { # The HDFS metrics. 136 "a_key": "A String", 137 }, 138 }, 139 "statusHistory": [ # Output only. The previous cluster status. 140 { # The status of a cluster and its instances. 141 "state": "A String", # Output only. The cluster's state. 142 "stateStartTime": "A String", # Output only. Time when this state was entered. 143 "detail": "A String", # Output only. Optional details of cluster's state. 144 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 145 }, 146 ], 147 "config": { # The cluster config. # Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated. 148 "lifecycleConfig": { # Specifies the cluster auto-delete schedule configuration. # Optional. The config setting for auto delete cluster schedule. 149 "autoDeleteTime": "A String", # Optional. The time when cluster will be auto-deleted. 150 "idleDeleteTtl": "A String", # Optional. The duration to keep the cluster alive while idling. Passing this threshold will cause the cluster to be deleted. Valid range: 10m, 14d.Example: "10m", the minimum value, to delete the cluster when it has had no jobs running for 10 minutes. 151 "autoDeleteTtl": "A String", # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Valid range: 10m, 14d.Example: "1d", to delete the cluster 1 day after its creation.. 152 }, 153 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster. 154 "imageVersion": "A String", # Optional. The version of software inside the cluster. It must be one of the supported Cloud Dataproc Versions, such as "1.2" (including a subminor version, such as "1.2.29"), or the "preview" version. If unspecified, it defaults to the latest Debian version. 155 "optionalComponents": [ # The set of optional components to activate on the cluster. 156 "A String", 157 ], 158 "properties": { # 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: 159 # capacity-scheduler: capacity-scheduler.xml 160 # core: core-site.xml 161 # distcp: distcp-default.xml 162 # hdfs: hdfs-site.xml 163 # hive: hive-site.xml 164 # mapred: mapred-site.xml 165 # pig: pig.properties 166 # spark: spark-defaults.conf 167 # yarn: yarn-site.xmlFor more information, see Cluster properties. 168 "a_key": "A String", 169 }, 170 }, 171 "configBucket": "A String", # Optional. A Google 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's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Cloud Dataproc staging bucket). 172 "gceClusterConfig": { # 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. 173 "internalIpOnly": 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. 174 "reservationAffinity": { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation. 175 "values": [ # Optional. Corresponds to the label values of reservation resource. 176 "A String", 177 ], 178 "consumeReservationType": "A String", # Optional. Type of reservation to consume 179 "key": "A String", # Optional. Corresponds to the label key of reservation resource. 180 }, 181 "networkUri": "A String", # 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 "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples: 182 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default 183 # projects/[project_id]/regions/global/default 184 # default 185 "tags": [ # The Compute Engine tags to add to all instances (see Tagging instances). 186 "A String", 187 ], 188 "serviceAccount": "A String", # Optional. The service account of the instances. Defaults to the default Compute Engine service account. Custom service accounts need permissions equivalent to the following IAM roles: 189 # roles/logging.logWriter 190 # roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com 191 "zoneUri": "A String", # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the "global" region. If omitted in a non-global Cloud 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: 192 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone] 193 # projects/[project_id]/zones/[zone] 194 # us-central1-f 195 "subnetworkUri": "A String", # 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: 196 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0 197 # projects/[project_id]/regions/us-east1/subnetworks/sub0 198 # sub0 199 "serviceAccountScopes": [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included: 200 # https://www.googleapis.com/auth/cloud.useraccounts.readonly 201 # https://www.googleapis.com/auth/devstorage.read_write 202 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided: 203 # https://www.googleapis.com/auth/bigquery 204 # https://www.googleapis.com/auth/bigtable.admin.table 205 # https://www.googleapis.com/auth/bigtable.data 206 # https://www.googleapis.com/auth/devstorage.full_control 207 "A String", 208 ], 209 "metadata": { # 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)). 210 "a_key": "A String", 211 }, 212 }, 213 "autoscalingConfig": { # 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. 214 "policyUri": "A String", # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples: 215 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id] 216 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Cloud Dataproc region. 217 }, 218 "endpointConfig": { # Endpoint config for this cluster # Optional. Port/endpoint configuration for this cluster 219 "httpPorts": { # Output only. The map of port descriptions to URLs. Will only be populated if enable_http_port_access is true. 220 "a_key": "A String", 221 }, 222 "enableHttpPortAccess": True or False, # Optional. If true, enable http access to specific ports on the cluster from external sources. Defaults to false. 223 }, 224 "workerConfig": { # Optional. 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. 225 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 226 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 227 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 228 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 229 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 230 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 231 "A String", 232 ], 233 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 234 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 235 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 236 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 237 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 238 }, 239 ], 240 "managedGroupConfig": { # 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. 241 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 242 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 243 }, 244 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 245 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 246 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 247 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 248 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 249 }, 250 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 251 }, 252 "initializationActions": [ # Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's <code>role</code> metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): 253 # ROLE=$(curl -H Metadata-Flavor:Google 254 # http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role) 255 # if [[ "${ROLE}" == 'Master' ]]; then 256 # ... master specific actions ... 257 # else 258 # ... worker specific actions ... 259 # fi 260 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion. 261 "executionTimeout": "A String", # Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. 262 "executableFile": "A String", # Required. Cloud Storage URI of executable file. 263 }, 264 ], 265 "encryptionConfig": { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster. 266 "gcePdKmsKeyName": "A String", # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster. 267 }, 268 "secondaryWorkerConfig": { # Optional. 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. 269 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 270 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 271 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 272 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 273 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 274 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 275 "A String", 276 ], 277 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 278 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 279 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 280 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 281 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 282 }, 283 ], 284 "managedGroupConfig": { # 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. 285 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 286 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 287 }, 288 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 289 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 290 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 291 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 292 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 293 }, 294 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 295 }, 296 "masterConfig": { # Optional. 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. 297 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 298 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 299 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 300 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 301 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 302 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 303 "A String", 304 ], 305 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 306 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 307 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 308 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 309 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 310 }, 311 ], 312 "managedGroupConfig": { # 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. 313 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 314 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 315 }, 316 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 317 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 318 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 319 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 320 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 321 }, 322 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 323 }, 324 "securityConfig": { # Security related configuration, including encryption, Kerberos, etc. # Optional. Security related configuration. 325 "kerberosConfig": { # Specifies Kerberos related configuration. # Kerberos related configuration. 326 "truststorePasswordUri": "A String", # 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. 327 "crossRealmTrustRealm": "A String", # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust. 328 "keyPasswordUri": "A String", # 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. 329 "enableKerberos": True or False, # Optional. Flag to indicate whether to Kerberize the cluster. 330 "tgtLifetimeHours": 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. 331 "crossRealmTrustKdc": "A String", # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 332 "rootPrincipalPasswordUri": "A String", # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password. 333 "keystorePasswordUri": "A String", # 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. 334 "crossRealmTrustSharedPasswordUri": "A String", # 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. 335 "crossRealmTrustAdminServer": "A String", # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 336 "truststoreUri": "A String", # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 337 "kmsKeyUri": "A String", # Required. The uri of the KMS key used to encrypt various sensitive files. 338 "kdcDbKeyUri": "A String", # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database. 339 "keystoreUri": "A String", # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 340 }, 341 }, 342 }, 343} 344 345 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. 346 x__xgafv: string, V1 error format. 347 Allowed values 348 1 - v1 error format 349 2 - v2 error format 350 351Returns: 352 An object of the form: 353 354 { # This resource represents a long-running operation that is the result of a network API call. 355 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 356 "a_key": "", # Properties of the object. Contains field @type with type URL. 357 }, 358 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 359 "a_key": "", # Properties of the object. Contains field @type with type URL. 360 }, 361 "done": True or False, # If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. 362 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}. 363 "error": { # The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). 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. 364 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 365 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 366 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 367 { 368 "a_key": "", # Properties of the object. Contains field @type with type URL. 369 }, 370 ], 371 }, 372 }</pre> 373</div> 374 375<div class="method"> 376 <code class="details" id="delete">delete(projectId, region, clusterName, clusterUuid=None, requestId=None, x__xgafv=None)</code> 377 <pre>Deletes a cluster in a project. 378 379Args: 380 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required) 381 region: string, Required. The Cloud Dataproc region in which to handle the request. (required) 382 clusterName: string, Required. The cluster name. (required) 383 clusterUuid: string, Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist. 384 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. 385 x__xgafv: string, V1 error format. 386 Allowed values 387 1 - v1 error format 388 2 - v2 error format 389 390Returns: 391 An object of the form: 392 393 { # This resource represents a long-running operation that is the result of a network API call. 394 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 395 "a_key": "", # Properties of the object. Contains field @type with type URL. 396 }, 397 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 398 "a_key": "", # Properties of the object. Contains field @type with type URL. 399 }, 400 "done": True or False, # If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. 401 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}. 402 "error": { # The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). 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. 403 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 404 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 405 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 406 { 407 "a_key": "", # Properties of the object. Contains field @type with type URL. 408 }, 409 ], 410 }, 411 }</pre> 412</div> 413 414<div class="method"> 415 <code class="details" id="diagnose">diagnose(projectId, region, clusterName, body=None, x__xgafv=None)</code> 416 <pre>Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation. 417 418Args: 419 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required) 420 region: string, Required. The Cloud Dataproc region in which to handle the request. (required) 421 clusterName: string, Required. The cluster name. (required) 422 body: object, The request body. 423 The object takes the form of: 424 425{ # A request to collect cluster diagnostic information. 426 } 427 428 x__xgafv: string, V1 error format. 429 Allowed values 430 1 - v1 error format 431 2 - v2 error format 432 433Returns: 434 An object of the form: 435 436 { # This resource represents a long-running operation that is the result of a network API call. 437 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 438 "a_key": "", # Properties of the object. Contains field @type with type URL. 439 }, 440 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 441 "a_key": "", # Properties of the object. Contains field @type with type URL. 442 }, 443 "done": True or False, # If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. 444 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}. 445 "error": { # The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). 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. 446 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 447 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 448 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 449 { 450 "a_key": "", # Properties of the object. Contains field @type with type URL. 451 }, 452 ], 453 }, 454 }</pre> 455</div> 456 457<div class="method"> 458 <code class="details" id="get">get(projectId, region, clusterName, x__xgafv=None)</code> 459 <pre>Gets the resource representation for a cluster in a project. 460 461Args: 462 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required) 463 region: string, Required. The Cloud Dataproc region in which to handle the request. (required) 464 clusterName: string, Required. The cluster name. (required) 465 x__xgafv: string, V1 error format. 466 Allowed values 467 1 - v1 error format 468 2 - v2 error format 469 470Returns: 471 An object of the form: 472 473 { # Describes the identifying information, config, and status of a cluster of Compute Engine instances. 474 "status": { # The status of a cluster and its instances. # Output only. Cluster status. 475 "state": "A String", # Output only. The cluster's state. 476 "stateStartTime": "A String", # Output only. Time when this state was entered. 477 "detail": "A String", # Output only. Optional details of cluster's state. 478 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 479 }, 480 "clusterUuid": "A String", # Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster. 481 "clusterName": "A String", # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused. 482 "projectId": "A String", # Required. The Google Cloud Platform project ID that the cluster belongs to. 483 "labels": { # 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. 484 "a_key": "A String", 485 }, 486 "metrics": { # 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. 487 "yarnMetrics": { # The YARN metrics. 488 "a_key": "A String", 489 }, 490 "hdfsMetrics": { # The HDFS metrics. 491 "a_key": "A String", 492 }, 493 }, 494 "statusHistory": [ # Output only. The previous cluster status. 495 { # The status of a cluster and its instances. 496 "state": "A String", # Output only. The cluster's state. 497 "stateStartTime": "A String", # Output only. Time when this state was entered. 498 "detail": "A String", # Output only. Optional details of cluster's state. 499 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 500 }, 501 ], 502 "config": { # The cluster config. # Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated. 503 "lifecycleConfig": { # Specifies the cluster auto-delete schedule configuration. # Optional. The config setting for auto delete cluster schedule. 504 "autoDeleteTime": "A String", # Optional. The time when cluster will be auto-deleted. 505 "idleDeleteTtl": "A String", # Optional. The duration to keep the cluster alive while idling. Passing this threshold will cause the cluster to be deleted. Valid range: 10m, 14d.Example: "10m", the minimum value, to delete the cluster when it has had no jobs running for 10 minutes. 506 "autoDeleteTtl": "A String", # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Valid range: 10m, 14d.Example: "1d", to delete the cluster 1 day after its creation.. 507 }, 508 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster. 509 "imageVersion": "A String", # Optional. The version of software inside the cluster. It must be one of the supported Cloud Dataproc Versions, such as "1.2" (including a subminor version, such as "1.2.29"), or the "preview" version. If unspecified, it defaults to the latest Debian version. 510 "optionalComponents": [ # The set of optional components to activate on the cluster. 511 "A String", 512 ], 513 "properties": { # 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: 514 # capacity-scheduler: capacity-scheduler.xml 515 # core: core-site.xml 516 # distcp: distcp-default.xml 517 # hdfs: hdfs-site.xml 518 # hive: hive-site.xml 519 # mapred: mapred-site.xml 520 # pig: pig.properties 521 # spark: spark-defaults.conf 522 # yarn: yarn-site.xmlFor more information, see Cluster properties. 523 "a_key": "A String", 524 }, 525 }, 526 "configBucket": "A String", # Optional. A Google 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's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Cloud Dataproc staging bucket). 527 "gceClusterConfig": { # 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. 528 "internalIpOnly": 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. 529 "reservationAffinity": { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation. 530 "values": [ # Optional. Corresponds to the label values of reservation resource. 531 "A String", 532 ], 533 "consumeReservationType": "A String", # Optional. Type of reservation to consume 534 "key": "A String", # Optional. Corresponds to the label key of reservation resource. 535 }, 536 "networkUri": "A String", # 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 "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples: 537 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default 538 # projects/[project_id]/regions/global/default 539 # default 540 "tags": [ # The Compute Engine tags to add to all instances (see Tagging instances). 541 "A String", 542 ], 543 "serviceAccount": "A String", # Optional. The service account of the instances. Defaults to the default Compute Engine service account. Custom service accounts need permissions equivalent to the following IAM roles: 544 # roles/logging.logWriter 545 # roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com 546 "zoneUri": "A String", # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the "global" region. If omitted in a non-global Cloud 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: 547 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone] 548 # projects/[project_id]/zones/[zone] 549 # us-central1-f 550 "subnetworkUri": "A String", # 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: 551 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0 552 # projects/[project_id]/regions/us-east1/subnetworks/sub0 553 # sub0 554 "serviceAccountScopes": [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included: 555 # https://www.googleapis.com/auth/cloud.useraccounts.readonly 556 # https://www.googleapis.com/auth/devstorage.read_write 557 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided: 558 # https://www.googleapis.com/auth/bigquery 559 # https://www.googleapis.com/auth/bigtable.admin.table 560 # https://www.googleapis.com/auth/bigtable.data 561 # https://www.googleapis.com/auth/devstorage.full_control 562 "A String", 563 ], 564 "metadata": { # 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)). 565 "a_key": "A String", 566 }, 567 }, 568 "autoscalingConfig": { # 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. 569 "policyUri": "A String", # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples: 570 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id] 571 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Cloud Dataproc region. 572 }, 573 "endpointConfig": { # Endpoint config for this cluster # Optional. Port/endpoint configuration for this cluster 574 "httpPorts": { # Output only. The map of port descriptions to URLs. Will only be populated if enable_http_port_access is true. 575 "a_key": "A String", 576 }, 577 "enableHttpPortAccess": True or False, # Optional. If true, enable http access to specific ports on the cluster from external sources. Defaults to false. 578 }, 579 "workerConfig": { # Optional. 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. 580 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 581 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 582 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 583 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 584 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 585 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 586 "A String", 587 ], 588 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 589 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 590 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 591 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 592 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 593 }, 594 ], 595 "managedGroupConfig": { # 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. 596 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 597 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 598 }, 599 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 600 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 601 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 602 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 603 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 604 }, 605 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 606 }, 607 "initializationActions": [ # Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's <code>role</code> metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): 608 # ROLE=$(curl -H Metadata-Flavor:Google 609 # http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role) 610 # if [[ "${ROLE}" == 'Master' ]]; then 611 # ... master specific actions ... 612 # else 613 # ... worker specific actions ... 614 # fi 615 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion. 616 "executionTimeout": "A String", # Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. 617 "executableFile": "A String", # Required. Cloud Storage URI of executable file. 618 }, 619 ], 620 "encryptionConfig": { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster. 621 "gcePdKmsKeyName": "A String", # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster. 622 }, 623 "secondaryWorkerConfig": { # Optional. 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. 624 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 625 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 626 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 627 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 628 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 629 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 630 "A String", 631 ], 632 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 633 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 634 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 635 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 636 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 637 }, 638 ], 639 "managedGroupConfig": { # 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. 640 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 641 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 642 }, 643 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 644 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 645 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 646 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 647 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 648 }, 649 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 650 }, 651 "masterConfig": { # Optional. 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. 652 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 653 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 654 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 655 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 656 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 657 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 658 "A String", 659 ], 660 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 661 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 662 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 663 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 664 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 665 }, 666 ], 667 "managedGroupConfig": { # 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. 668 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 669 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 670 }, 671 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 672 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 673 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 674 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 675 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 676 }, 677 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 678 }, 679 "securityConfig": { # Security related configuration, including encryption, Kerberos, etc. # Optional. Security related configuration. 680 "kerberosConfig": { # Specifies Kerberos related configuration. # Kerberos related configuration. 681 "truststorePasswordUri": "A String", # 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. 682 "crossRealmTrustRealm": "A String", # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust. 683 "keyPasswordUri": "A String", # 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. 684 "enableKerberos": True or False, # Optional. Flag to indicate whether to Kerberize the cluster. 685 "tgtLifetimeHours": 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. 686 "crossRealmTrustKdc": "A String", # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 687 "rootPrincipalPasswordUri": "A String", # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password. 688 "keystorePasswordUri": "A String", # 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. 689 "crossRealmTrustSharedPasswordUri": "A String", # 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. 690 "crossRealmTrustAdminServer": "A String", # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 691 "truststoreUri": "A String", # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 692 "kmsKeyUri": "A String", # Required. The uri of the KMS key used to encrypt various sensitive files. 693 "kdcDbKeyUri": "A String", # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database. 694 "keystoreUri": "A String", # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 695 }, 696 }, 697 }, 698 }</pre> 699</div> 700 701<div class="method"> 702 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code> 703 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. 704 705Args: 706 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required) 707 x__xgafv: string, V1 error format. 708 Allowed values 709 1 - v1 error format 710 2 - v2 error format 711 712Returns: 713 An object of the form: 714 715 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.JSON Example 716 # { 717 # "bindings": [ 718 # { 719 # "role": "roles/owner", 720 # "members": [ 721 # "user:mike@example.com", 722 # "group:admins@example.com", 723 # "domain:google.com", 724 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 725 # ] 726 # }, 727 # { 728 # "role": "roles/viewer", 729 # "members": ["user:sean@example.com"] 730 # } 731 # ] 732 # } 733 # YAML Example 734 # bindings: 735 # - members: 736 # - user:mike@example.com 737 # - group:admins@example.com 738 # - domain:google.com 739 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 740 # role: roles/owner 741 # - members: 742 # - user:sean@example.com 743 # role: roles/viewer 744 # For a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam/docs). 745 "bindings": [ # Associates a list of members to a role. bindings with no members will result in an error. 746 { # Associates members with a role. 747 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. 748 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: 749 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. 750 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. 751 # user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . 752 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. 753 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com. 754 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com. 755 "A String", 756 ], 757 "condition": { # Represents an expression text. Example: # 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. 758 # title: "User account presence" 759 # description: "Determines whether the request has a user account" 760 # expression: "size(request.user) > 0" 761 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 762 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.The application context of the containing message determines which well-known feature set of CEL is supported. 763 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 764 "title": "A String", # An 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. 765 }, 766 }, 767 ], 768 "etag": "A String", # 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.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly. 769 "version": 42, # Deprecated. 770 }</pre> 771</div> 772 773<div class="method"> 774 <code class="details" id="list">list(projectId, region, pageSize=None, pageToken=None, x__xgafv=None, filter=None)</code> 775 <pre>Lists all regions/{region}/clusters in a project. 776 777Args: 778 projectId: string, Required. The ID of the Google Cloud Platform project that the cluster belongs to. (required) 779 region: string, Required. The Cloud Dataproc region in which to handle the request. (required) 780 pageSize: integer, Optional. The standard List page size. 781 pageToken: string, Optional. The standard List page token. 782 x__xgafv: string, V1 error format. 783 Allowed values 784 1 - v1 error format 785 2 - v2 error format 786 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 = * 787 788Returns: 789 An object of the form: 790 791 { # The list of all clusters in a project. 792 "nextPageToken": "A String", # 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 <code>ListClustersRequest</code>. 793 "clusters": [ # Output only. The clusters in the project. 794 { # Describes the identifying information, config, and status of a cluster of Compute Engine instances. 795 "status": { # The status of a cluster and its instances. # Output only. Cluster status. 796 "state": "A String", # Output only. The cluster's state. 797 "stateStartTime": "A String", # Output only. Time when this state was entered. 798 "detail": "A String", # Output only. Optional details of cluster's state. 799 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 800 }, 801 "clusterUuid": "A String", # Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster. 802 "clusterName": "A String", # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused. 803 "projectId": "A String", # Required. The Google Cloud Platform project ID that the cluster belongs to. 804 "labels": { # 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. 805 "a_key": "A String", 806 }, 807 "metrics": { # 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. 808 "yarnMetrics": { # The YARN metrics. 809 "a_key": "A String", 810 }, 811 "hdfsMetrics": { # The HDFS metrics. 812 "a_key": "A String", 813 }, 814 }, 815 "statusHistory": [ # Output only. The previous cluster status. 816 { # The status of a cluster and its instances. 817 "state": "A String", # Output only. The cluster's state. 818 "stateStartTime": "A String", # Output only. Time when this state was entered. 819 "detail": "A String", # Output only. Optional details of cluster's state. 820 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 821 }, 822 ], 823 "config": { # The cluster config. # Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated. 824 "lifecycleConfig": { # Specifies the cluster auto-delete schedule configuration. # Optional. The config setting for auto delete cluster schedule. 825 "autoDeleteTime": "A String", # Optional. The time when cluster will be auto-deleted. 826 "idleDeleteTtl": "A String", # Optional. The duration to keep the cluster alive while idling. Passing this threshold will cause the cluster to be deleted. Valid range: 10m, 14d.Example: "10m", the minimum value, to delete the cluster when it has had no jobs running for 10 minutes. 827 "autoDeleteTtl": "A String", # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Valid range: 10m, 14d.Example: "1d", to delete the cluster 1 day after its creation.. 828 }, 829 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster. 830 "imageVersion": "A String", # Optional. The version of software inside the cluster. It must be one of the supported Cloud Dataproc Versions, such as "1.2" (including a subminor version, such as "1.2.29"), or the "preview" version. If unspecified, it defaults to the latest Debian version. 831 "optionalComponents": [ # The set of optional components to activate on the cluster. 832 "A String", 833 ], 834 "properties": { # 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: 835 # capacity-scheduler: capacity-scheduler.xml 836 # core: core-site.xml 837 # distcp: distcp-default.xml 838 # hdfs: hdfs-site.xml 839 # hive: hive-site.xml 840 # mapred: mapred-site.xml 841 # pig: pig.properties 842 # spark: spark-defaults.conf 843 # yarn: yarn-site.xmlFor more information, see Cluster properties. 844 "a_key": "A String", 845 }, 846 }, 847 "configBucket": "A String", # Optional. A Google 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's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Cloud Dataproc staging bucket). 848 "gceClusterConfig": { # 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. 849 "internalIpOnly": 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. 850 "reservationAffinity": { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation. 851 "values": [ # Optional. Corresponds to the label values of reservation resource. 852 "A String", 853 ], 854 "consumeReservationType": "A String", # Optional. Type of reservation to consume 855 "key": "A String", # Optional. Corresponds to the label key of reservation resource. 856 }, 857 "networkUri": "A String", # 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 "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples: 858 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default 859 # projects/[project_id]/regions/global/default 860 # default 861 "tags": [ # The Compute Engine tags to add to all instances (see Tagging instances). 862 "A String", 863 ], 864 "serviceAccount": "A String", # Optional. The service account of the instances. Defaults to the default Compute Engine service account. Custom service accounts need permissions equivalent to the following IAM roles: 865 # roles/logging.logWriter 866 # roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com 867 "zoneUri": "A String", # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the "global" region. If omitted in a non-global Cloud 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: 868 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone] 869 # projects/[project_id]/zones/[zone] 870 # us-central1-f 871 "subnetworkUri": "A String", # 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: 872 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0 873 # projects/[project_id]/regions/us-east1/subnetworks/sub0 874 # sub0 875 "serviceAccountScopes": [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included: 876 # https://www.googleapis.com/auth/cloud.useraccounts.readonly 877 # https://www.googleapis.com/auth/devstorage.read_write 878 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided: 879 # https://www.googleapis.com/auth/bigquery 880 # https://www.googleapis.com/auth/bigtable.admin.table 881 # https://www.googleapis.com/auth/bigtable.data 882 # https://www.googleapis.com/auth/devstorage.full_control 883 "A String", 884 ], 885 "metadata": { # 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)). 886 "a_key": "A String", 887 }, 888 }, 889 "autoscalingConfig": { # 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. 890 "policyUri": "A String", # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples: 891 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id] 892 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Cloud Dataproc region. 893 }, 894 "endpointConfig": { # Endpoint config for this cluster # Optional. Port/endpoint configuration for this cluster 895 "httpPorts": { # Output only. The map of port descriptions to URLs. Will only be populated if enable_http_port_access is true. 896 "a_key": "A String", 897 }, 898 "enableHttpPortAccess": True or False, # Optional. If true, enable http access to specific ports on the cluster from external sources. Defaults to false. 899 }, 900 "workerConfig": { # Optional. 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. 901 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 902 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 903 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 904 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 905 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 906 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 907 "A String", 908 ], 909 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 910 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 911 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 912 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 913 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 914 }, 915 ], 916 "managedGroupConfig": { # 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. 917 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 918 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 919 }, 920 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 921 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 922 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 923 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 924 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 925 }, 926 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 927 }, 928 "initializationActions": [ # Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's <code>role</code> metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): 929 # ROLE=$(curl -H Metadata-Flavor:Google 930 # http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role) 931 # if [[ "${ROLE}" == 'Master' ]]; then 932 # ... master specific actions ... 933 # else 934 # ... worker specific actions ... 935 # fi 936 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion. 937 "executionTimeout": "A String", # Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. 938 "executableFile": "A String", # Required. Cloud Storage URI of executable file. 939 }, 940 ], 941 "encryptionConfig": { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster. 942 "gcePdKmsKeyName": "A String", # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster. 943 }, 944 "secondaryWorkerConfig": { # Optional. 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 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 946 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 947 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 948 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 949 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 950 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 951 "A String", 952 ], 953 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 954 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 955 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 956 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 957 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 958 }, 959 ], 960 "managedGroupConfig": { # 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. 961 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 962 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 963 }, 964 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 965 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 966 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 967 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 968 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 969 }, 970 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 971 }, 972 "masterConfig": { # Optional. 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. 973 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 974 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 975 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 976 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 977 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 978 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 979 "A String", 980 ], 981 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 982 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 983 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 984 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 985 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 986 }, 987 ], 988 "managedGroupConfig": { # 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. 989 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 990 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 991 }, 992 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 993 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 994 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 995 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 996 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 997 }, 998 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 999 }, 1000 "securityConfig": { # Security related configuration, including encryption, Kerberos, etc. # Optional. Security related configuration. 1001 "kerberosConfig": { # Specifies Kerberos related configuration. # Kerberos related configuration. 1002 "truststorePasswordUri": "A String", # 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. 1003 "crossRealmTrustRealm": "A String", # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust. 1004 "keyPasswordUri": "A String", # 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. 1005 "enableKerberos": True or False, # Optional. Flag to indicate whether to Kerberize the cluster. 1006 "tgtLifetimeHours": 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. 1007 "crossRealmTrustKdc": "A String", # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 1008 "rootPrincipalPasswordUri": "A String", # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password. 1009 "keystorePasswordUri": "A String", # 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. 1010 "crossRealmTrustSharedPasswordUri": "A String", # 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. 1011 "crossRealmTrustAdminServer": "A String", # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 1012 "truststoreUri": "A String", # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 1013 "kmsKeyUri": "A String", # Required. The uri of the KMS key used to encrypt various sensitive files. 1014 "kdcDbKeyUri": "A String", # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database. 1015 "keystoreUri": "A String", # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 1016 }, 1017 }, 1018 }, 1019 }, 1020 ], 1021 }</pre> 1022</div> 1023 1024<div class="method"> 1025 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1026 <pre>Retrieves the next page of results. 1027 1028Args: 1029 previous_request: The request for the previous page. (required) 1030 previous_response: The response from the request for the previous page. (required) 1031 1032Returns: 1033 A request object that you can call 'execute()' on to request the next 1034 page. Returns None if there are no more items in the collection. 1035 </pre> 1036</div> 1037 1038<div class="method"> 1039 <code class="details" id="patch">patch(projectId, region, clusterName, body, x__xgafv=None, gracefulDecommissionTimeout=None, requestId=None, updateMask=None)</code> 1040 <pre>Updates a cluster in a project. 1041 1042Args: 1043 projectId: string, Required. The ID of the Google Cloud Platform project the cluster belongs to. (required) 1044 region: string, Required. The Cloud Dataproc region in which to handle the request. (required) 1045 clusterName: string, Required. The cluster name. (required) 1046 body: object, The request body. (required) 1047 The object takes the form of: 1048 1049{ # Describes the identifying information, config, and status of a cluster of Compute Engine instances. 1050 "status": { # The status of a cluster and its instances. # Output only. Cluster status. 1051 "state": "A String", # Output only. The cluster's state. 1052 "stateStartTime": "A String", # Output only. Time when this state was entered. 1053 "detail": "A String", # Output only. Optional details of cluster's state. 1054 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 1055 }, 1056 "clusterUuid": "A String", # Output only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster. 1057 "clusterName": "A String", # Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused. 1058 "projectId": "A String", # Required. The Google Cloud Platform project ID that the cluster belongs to. 1059 "labels": { # 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. 1060 "a_key": "A String", 1061 }, 1062 "metrics": { # 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. 1063 "yarnMetrics": { # The YARN metrics. 1064 "a_key": "A String", 1065 }, 1066 "hdfsMetrics": { # The HDFS metrics. 1067 "a_key": "A String", 1068 }, 1069 }, 1070 "statusHistory": [ # Output only. The previous cluster status. 1071 { # The status of a cluster and its instances. 1072 "state": "A String", # Output only. The cluster's state. 1073 "stateStartTime": "A String", # Output only. Time when this state was entered. 1074 "detail": "A String", # Output only. Optional details of cluster's state. 1075 "substate": "A String", # Output only. Additional state information that includes status reported by the agent. 1076 }, 1077 ], 1078 "config": { # The cluster config. # Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated. 1079 "lifecycleConfig": { # Specifies the cluster auto-delete schedule configuration. # Optional. The config setting for auto delete cluster schedule. 1080 "autoDeleteTime": "A String", # Optional. The time when cluster will be auto-deleted. 1081 "idleDeleteTtl": "A String", # Optional. The duration to keep the cluster alive while idling. Passing this threshold will cause the cluster to be deleted. Valid range: 10m, 14d.Example: "10m", the minimum value, to delete the cluster when it has had no jobs running for 10 minutes. 1082 "autoDeleteTtl": "A String", # Optional. The lifetime duration of cluster. The cluster will be auto-deleted at the end of this period. Valid range: 10m, 14d.Example: "1d", to delete the cluster 1 day after its creation.. 1083 }, 1084 "softwareConfig": { # Specifies the selection and config of software inside the cluster. # Optional. The config settings for software inside the cluster. 1085 "imageVersion": "A String", # Optional. The version of software inside the cluster. It must be one of the supported Cloud Dataproc Versions, such as "1.2" (including a subminor version, such as "1.2.29"), or the "preview" version. If unspecified, it defaults to the latest Debian version. 1086 "optionalComponents": [ # The set of optional components to activate on the cluster. 1087 "A String", 1088 ], 1089 "properties": { # 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: 1090 # capacity-scheduler: capacity-scheduler.xml 1091 # core: core-site.xml 1092 # distcp: distcp-default.xml 1093 # hdfs: hdfs-site.xml 1094 # hive: hive-site.xml 1095 # mapred: mapred-site.xml 1096 # pig: pig.properties 1097 # spark: spark-defaults.conf 1098 # yarn: yarn-site.xmlFor more information, see Cluster properties. 1099 "a_key": "A String", 1100 }, 1101 }, 1102 "configBucket": "A String", # Optional. A Google 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's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see Cloud Dataproc staging bucket). 1103 "gceClusterConfig": { # 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. 1104 "internalIpOnly": 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. 1105 "reservationAffinity": { # Reservation Affinity for consuming Zonal reservation. # Optional. Reservation Affinity for consuming Zonal reservation. 1106 "values": [ # Optional. Corresponds to the label values of reservation resource. 1107 "A String", 1108 ], 1109 "consumeReservationType": "A String", # Optional. Type of reservation to consume 1110 "key": "A String", # Optional. Corresponds to the label key of reservation resource. 1111 }, 1112 "networkUri": "A String", # 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 "default" network of the project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples: 1113 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default 1114 # projects/[project_id]/regions/global/default 1115 # default 1116 "tags": [ # The Compute Engine tags to add to all instances (see Tagging instances). 1117 "A String", 1118 ], 1119 "serviceAccount": "A String", # Optional. The service account of the instances. Defaults to the default Compute Engine service account. Custom service accounts need permissions equivalent to the following IAM roles: 1120 # roles/logging.logWriter 1121 # roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com 1122 "zoneUri": "A String", # Optional. The zone where the Compute Engine cluster will be located. On a create request, it is required in the "global" region. If omitted in a non-global Cloud 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: 1123 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone] 1124 # projects/[project_id]/zones/[zone] 1125 # us-central1-f 1126 "subnetworkUri": "A String", # 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: 1127 # https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0 1128 # projects/[project_id]/regions/us-east1/subnetworks/sub0 1129 # sub0 1130 "serviceAccountScopes": [ # Optional. The URIs of service account scopes to be included in Compute Engine instances. The following base set of scopes is always included: 1131 # https://www.googleapis.com/auth/cloud.useraccounts.readonly 1132 # https://www.googleapis.com/auth/devstorage.read_write 1133 # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided: 1134 # https://www.googleapis.com/auth/bigquery 1135 # https://www.googleapis.com/auth/bigtable.admin.table 1136 # https://www.googleapis.com/auth/bigtable.data 1137 # https://www.googleapis.com/auth/devstorage.full_control 1138 "A String", 1139 ], 1140 "metadata": { # 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)). 1141 "a_key": "A String", 1142 }, 1143 }, 1144 "autoscalingConfig": { # 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. 1145 "policyUri": "A String", # Optional. The autoscaling policy used by the cluster.Only resource names including projectid and location (region) are valid. Examples: 1146 # https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id] 1147 # projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Cloud Dataproc region. 1148 }, 1149 "endpointConfig": { # Endpoint config for this cluster # Optional. Port/endpoint configuration for this cluster 1150 "httpPorts": { # Output only. The map of port descriptions to URLs. Will only be populated if enable_http_port_access is true. 1151 "a_key": "A String", 1152 }, 1153 "enableHttpPortAccess": True or False, # Optional. If true, enable http access to specific ports on the cluster from external sources. Defaults to false. 1154 }, 1155 "workerConfig": { # Optional. 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. 1156 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 1157 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 1158 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 1159 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 1160 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 1161 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 1162 "A String", 1163 ], 1164 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 1165 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 1166 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 1167 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 1168 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 1169 }, 1170 ], 1171 "managedGroupConfig": { # 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. 1172 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 1173 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 1174 }, 1175 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 1176 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 1177 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 1178 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 1179 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 1180 }, 1181 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 1182 }, 1183 "initializationActions": [ # Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's <code>role</code> metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget): 1184 # ROLE=$(curl -H Metadata-Flavor:Google 1185 # http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role) 1186 # if [[ "${ROLE}" == 'Master' ]]; then 1187 # ... master specific actions ... 1188 # else 1189 # ... worker specific actions ... 1190 # fi 1191 { # Specifies an executable to run on a fully configured node and a timeout period for executable completion. 1192 "executionTimeout": "A String", # Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period. 1193 "executableFile": "A String", # Required. Cloud Storage URI of executable file. 1194 }, 1195 ], 1196 "encryptionConfig": { # Encryption settings for the cluster. # Optional. Encryption settings for the cluster. 1197 "gcePdKmsKeyName": "A String", # Optional. The Cloud KMS key name to use for PD disk encryption for all instances in the cluster. 1198 }, 1199 "secondaryWorkerConfig": { # Optional. 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. 1200 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 1201 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 1202 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 1203 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 1204 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 1205 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 1206 "A String", 1207 ], 1208 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 1209 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 1210 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 1211 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 1212 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 1213 }, 1214 ], 1215 "managedGroupConfig": { # 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. 1216 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 1217 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 1218 }, 1219 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 1220 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 1221 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 1222 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 1223 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 1224 }, 1225 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 1226 }, 1227 "masterConfig": { # Optional. 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. 1228 "isPreemptible": True or False, # Optional. Specifies that this instance group contains preemptible instances. 1229 "machineTypeUri": "A String", # Optional. The Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples: 1230 # https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 1231 # projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 1232 # n1-standard-2Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2. 1233 "instanceNames": [ # Output only. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group. 1234 "A String", 1235 ], 1236 "imageUri": "A String", # Optional. The Compute Engine image resource used for cluster instances. It can be specified or may be inferred from SoftwareConfig.image_version. 1237 "accelerators": [ # Optional. The Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release. 1238 { # Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine). 1239 "acceleratorCount": 42, # The number of the accelerator cards of this type exposed to this instance. 1240 "acceleratorTypeUri": "A String", # Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Compute Engine AcceleratorTypesExamples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Cloud Dataproc Auto Zone Placement feature, you must use the short name of the accelerator type resource, for example, nvidia-tesla-k80. 1241 }, 1242 ], 1243 "managedGroupConfig": { # 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. 1244 "instanceTemplateName": "A String", # Output only. The name of the Instance Template used for the Managed Instance Group. 1245 "instanceGroupManagerName": "A String", # Output only. The name of the Instance Group Manager for this group. 1246 }, 1247 "minCpuPlatform": "A String", # Optional. Specifies the minimum cpu platform for the Instance Group. See Cloud Dataproc→Minimum CPU Platform. 1248 "diskConfig": { # Specifies the config of disk options for a group of VM instances. # Optional. Disk option config settings. 1249 "numLocalSsds": 42, # Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (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. 1250 "bootDiskType": "A String", # Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). 1251 "bootDiskSizeGb": 42, # Optional. Size in GB of the boot disk (default is 500GB). 1252 }, 1253 "numInstances": 42, # Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. 1254 }, 1255 "securityConfig": { # Security related configuration, including encryption, Kerberos, etc. # Optional. Security related configuration. 1256 "kerberosConfig": { # Specifies Kerberos related configuration. # Kerberos related configuration. 1257 "truststorePasswordUri": "A String", # 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. 1258 "crossRealmTrustRealm": "A String", # Optional. The remote realm the Dataproc on-cluster KDC will trust, should the user enable cross realm trust. 1259 "keyPasswordUri": "A String", # 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. 1260 "enableKerberos": True or False, # Optional. Flag to indicate whether to Kerberize the cluster. 1261 "tgtLifetimeHours": 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. 1262 "crossRealmTrustKdc": "A String", # Optional. The KDC (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 1263 "rootPrincipalPasswordUri": "A String", # Required. The Cloud Storage URI of a KMS encrypted file containing the root principal password. 1264 "keystorePasswordUri": "A String", # 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. 1265 "crossRealmTrustSharedPasswordUri": "A String", # 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. 1266 "crossRealmTrustAdminServer": "A String", # Optional. The admin server (IP or hostname) for the remote trusted realm in a cross realm trust relationship. 1267 "truststoreUri": "A String", # Optional. The Cloud Storage URI of the truststore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 1268 "kmsKeyUri": "A String", # Required. The uri of the KMS key used to encrypt various sensitive files. 1269 "kdcDbKeyUri": "A String", # Optional. The Cloud Storage URI of a KMS encrypted file containing the master key of the KDC database. 1270 "keystoreUri": "A String", # Optional. The Cloud Storage URI of the keystore file used for SSL encryption. If not provided, Dataproc will provide a self-signed certificate. 1271 }, 1272 }, 1273 }, 1274} 1275 1276 x__xgafv: string, V1 error format. 1277 Allowed values 1278 1 - v1 error format 1279 2 - v2 error format 1280 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.Only supported on Dataproc image versions 1.2 and higher. 1281 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. 1282 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: 1283{ 1284 "config":{ 1285 "workerConfig":{ 1286 "numInstances":"5" 1287 } 1288 } 1289} 1290Similarly, 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: 1291{ 1292 "config":{ 1293 "secondaryWorkerConfig":{ 1294 "numInstances":"5" 1295 } 1296 } 1297} 1298<strong>Note:</strong> currently only the following fields can be updated: 1299<table> 1300<tr> 1301<td><strong>Mask</strong></td><td><strong>Purpose</strong></td> 1302</tr> 1303<tr> 1304<td>labels</td><td>Updates labels</td> 1305</tr> 1306<tr> 1307<td>config.worker_config.num_instances</td><td>Resize primary worker 1308group</td> 1309</tr> 1310<tr> 1311<td>config.secondary_worker_config.num_instances</td><td>Resize secondary 1312worker group</td> 1313</tr> 1314<tr> 1315<td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL 1316duration</td> 1317</tr> 1318<tr> 1319<td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL 1320deletion timestamp</td> 1321</tr> 1322<tr> 1323<td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL 1324duration</td> 1325</tr> 1326<tr> 1327<td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change 1328autoscaling policies</td> 1329</tr> 1330</table> 1331 1332Returns: 1333 An object of the form: 1334 1335 { # This resource represents a long-running operation that is the result of a network API call. 1336 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 1337 "a_key": "", # Properties of the object. Contains field @type with type URL. 1338 }, 1339 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 1340 "a_key": "", # Properties of the object. Contains field @type with type URL. 1341 }, 1342 "done": True or False, # If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available. 1343 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}. 1344 "error": { # The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). 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. 1345 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 1346 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 1347 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 1348 { 1349 "a_key": "", # Properties of the object. Contains field @type with type URL. 1350 }, 1351 ], 1352 }, 1353 }</pre> 1354</div> 1355 1356<div class="method"> 1357 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code> 1358 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 1359 1360Args: 1361 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required) 1362 body: object, The request body. (required) 1363 The object takes the form of: 1364 1365{ # Request message for SetIamPolicy method. 1366 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.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. 1367 # { 1368 # "bindings": [ 1369 # { 1370 # "role": "roles/owner", 1371 # "members": [ 1372 # "user:mike@example.com", 1373 # "group:admins@example.com", 1374 # "domain:google.com", 1375 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 1376 # ] 1377 # }, 1378 # { 1379 # "role": "roles/viewer", 1380 # "members": ["user:sean@example.com"] 1381 # } 1382 # ] 1383 # } 1384 # YAML Example 1385 # bindings: 1386 # - members: 1387 # - user:mike@example.com 1388 # - group:admins@example.com 1389 # - domain:google.com 1390 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 1391 # role: roles/owner 1392 # - members: 1393 # - user:sean@example.com 1394 # role: roles/viewer 1395 # For a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam/docs). 1396 "bindings": [ # Associates a list of members to a role. bindings with no members will result in an error. 1397 { # Associates members with a role. 1398 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. 1399 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: 1400 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. 1401 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. 1402 # user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . 1403 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. 1404 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com. 1405 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com. 1406 "A String", 1407 ], 1408 "condition": { # Represents an expression text. Example: # 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. 1409 # title: "User account presence" 1410 # description: "Determines whether the request has a user account" 1411 # expression: "size(request.user) > 0" 1412 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1413 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.The application context of the containing message determines which well-known feature set of CEL is supported. 1414 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1415 "title": "A String", # An 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. 1416 }, 1417 }, 1418 ], 1419 "etag": "A String", # 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.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly. 1420 "version": 42, # Deprecated. 1421 }, 1422 } 1423 1424 x__xgafv: string, V1 error format. 1425 Allowed values 1426 1 - v1 error format 1427 2 - v2 error format 1428 1429Returns: 1430 An object of the form: 1431 1432 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.JSON Example 1433 # { 1434 # "bindings": [ 1435 # { 1436 # "role": "roles/owner", 1437 # "members": [ 1438 # "user:mike@example.com", 1439 # "group:admins@example.com", 1440 # "domain:google.com", 1441 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 1442 # ] 1443 # }, 1444 # { 1445 # "role": "roles/viewer", 1446 # "members": ["user:sean@example.com"] 1447 # } 1448 # ] 1449 # } 1450 # YAML Example 1451 # bindings: 1452 # - members: 1453 # - user:mike@example.com 1454 # - group:admins@example.com 1455 # - domain:google.com 1456 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 1457 # role: roles/owner 1458 # - members: 1459 # - user:sean@example.com 1460 # role: roles/viewer 1461 # For a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam/docs). 1462 "bindings": [ # Associates a list of members to a role. bindings with no members will result in an error. 1463 { # Associates members with a role. 1464 "role": "A String", # Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. 1465 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. members can have the following values: 1466 # allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. 1467 # allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. 1468 # user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com . 1469 # serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. 1470 # group:{emailid}: An email address that represents a Google group. For example, admins@example.com. 1471 # domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com. 1472 "A String", 1473 ], 1474 "condition": { # Represents an expression text. Example: # 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. 1475 # title: "User account presence" 1476 # description: "Determines whether the request has a user account" 1477 # expression: "size(request.user) > 0" 1478 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1479 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.The application context of the containing message determines which well-known feature set of CEL is supported. 1480 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1481 "title": "A String", # An 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. 1482 }, 1483 }, 1484 ], 1485 "etag": "A String", # 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.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly. 1486 "version": 42, # Deprecated. 1487 }</pre> 1488</div> 1489 1490<div class="method"> 1491 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code> 1492 <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 "fail open" without warning. 1493 1494Args: 1495 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) 1496 body: object, The request body. (required) 1497 The object takes the form of: 1498 1499{ # Request message for TestIamPermissions method. 1500 "permissions": [ # The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). 1501 "A String", 1502 ], 1503 } 1504 1505 x__xgafv: string, V1 error format. 1506 Allowed values 1507 1 - v1 error format 1508 2 - v2 error format 1509 1510Returns: 1511 An object of the form: 1512 1513 { # Response message for TestIamPermissions method. 1514 "permissions": [ # A subset of TestPermissionsRequest.permissions that the caller is allowed. 1515 "A String", 1516 ], 1517 }</pre> 1518</div> 1519 1520</body></html>