1bddafd3102e4e0841d78673581c3ead8f68a7c8,dataproc/list_clusters.py,,list_clusters,#Any#Any#Any#,23
Before Change
// [START dataproc_list_clusters]
def list_clusters(dataproc, project, region):
result = dataproc.projects().regions().clusters().list(
projectId=project,
region=region).execute()
return result
// [END dataproc_list_clusters]
After Change
// [START dataproc_list_clusters]
def list_clusters(dataproc, project, region):
List the details of clusters in the region.
for cluster in dataproc.list_clusters(project, region):
print(("{} - {}".format(cluster.cluster_name,
cluster.status.State.Name(
cluster.status.state))))
// [END dataproc_list_clusters]
def main(project_id, region):
if region == "global":
// Use the default gRPC global endpoints.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 1bddafd3102e4e0841d78673581c3ead8f68a7c8
Time: 2019-05-20
Author: amancuso@google.com
File Name: dataproc/list_clusters.py
Class Name:
Method Name: list_clusters
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 6f9eacfd1d5f6ebf961d134f538e7613c0b9fc25
Time: 2019-01-07
Author: d.sanche14@gmail.com
File Name: kms/api-client/snippets.py
Class Name:
Method Name: get_key_ring_policy
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: c8a2ce20be850ed99e8b7fb0d3ff48ec025fb4f0
Time: 2019-09-26
Author: gguuss@gmail.com
File Name: iot/api-client/manager/manager.py
Class Name:
Method Name: get_state