class ProjectsRegionsClusters extends Resource (View source)

The "clusters" collection of methods.

Typical usage is:

 $dataprocService = new Google\Service\Dataproc(...);
 $clusters = $dataprocService->projects_regions_clusters;

Methods

create(string $projectId, string $region, Cluster $postBody, array $optParams = [])

Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). (clusters.create)

delete(string $projectId, string $region, string $clusterName, array $optParams = [])

Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). (clusters.delete)

diagnose(string $projectId, string $region, string $clusterName, DiagnoseClusterRequest $postBody, array $optParams = [])

Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). After the operation completes, Operation.response contains DiagnoseClusterResults (https://cloud.

get(string $projectId, string $region, string $clusterName, array $optParams = [])

Gets the resource representation for a cluster in a project. (clusters.get)

getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (clusters.getIamPolicy)

injectCredentials(string $project, string $region, string $cluster, InjectCredentialsRequest $postBody, array $optParams = [])

Inject encrypted credentials into all of the VMs in a cluster.The target cluster must be a personal auth cluster assigned to the user who is issuing the RPC. (clusters.injectCredentials)

listProjectsRegionsClusters(string $projectId, string $region, array $optParams = [])

Lists all regions/{region}/clusters in a project alphabetically.

patch(string $projectId, string $region, string $clusterName, Cluster $postBody, array $optParams = [])

Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). The cluster must be in a RUNNING state or an error is returned. (clusters.patch)

repair(string $projectId, string $region, string $clusterName, RepairClusterRequest $postBody, array $optParams = [])

Repairs a cluster. (clusters.repair)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (clusters.setIamPolicy)

start(string $projectId, string $region, string $clusterName, StartClusterRequest $postBody, array $optParams = [])

Starts a cluster in a project. (clusters.start)

stop(string $projectId, string $region, string $clusterName, StopClusterRequest $postBody, array $optParams = [])

Stops a cluster in a project. (clusters.stop)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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.

Details

Operation create(string $projectId, string $region, Cluster $postBody, array $optParams = [])

Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). (clusters.create)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

Cluster $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $projectId, string $region, string $clusterName, array $optParams = [])

Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). (clusters.delete)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $clusterName

Required. The cluster name.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation diagnose(string $projectId, string $region, string $clusterName, DiagnoseClusterRequest $postBody, array $optParams = [])

Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). After the operation completes, Operation.response contains DiagnoseClusterResults (https://cloud.

google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclust erresults). (clusters.diagnose)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $clusterName

Required. The cluster name.

DiagnoseClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Cluster get(string $projectId, string $region, string $clusterName, array $optParams = [])

Gets the resource representation for a cluster in a project. (clusters.get)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $clusterName

Required. The cluster name.

array $optParams

Optional parameters.

Return Value

Cluster

Exceptions

Exception

Policy getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (clusters.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Operation injectCredentials(string $project, string $region, string $cluster, InjectCredentialsRequest $postBody, array $optParams = [])

Inject encrypted credentials into all of the VMs in a cluster.The target cluster must be a personal auth cluster assigned to the user who is issuing the RPC. (clusters.injectCredentials)

Parameters

string $project

Required. The ID of the Google Cloud Platform project the cluster belongs to, of the form projects/.

string $region

Required. The region containing the cluster, of the form regions/.

string $cluster

Required. The cluster, in the form clusters/.

InjectCredentialsRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ListClustersResponse listProjectsRegionsClusters(string $projectId, string $region, array $optParams = [])

Lists all regions/{region}/clusters in a project alphabetically.

(clusters.listProjectsRegionsClusters)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

array $optParams

Optional parameters.

Return Value

ListClustersResponse

Exceptions

Exception

Operation patch(string $projectId, string $region, string $clusterName, Cluster $postBody, array $optParams = [])

Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rp c/google.cloud.dataproc.v1#clusteroperationmetadata). The cluster must be in a RUNNING state or an error is returned. (clusters.patch)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $clusterName

Required. The cluster name.

Cluster $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation repair(string $projectId, string $region, string $clusterName, RepairClusterRequest $postBody, array $optParams = [])

Repairs a cluster. (clusters.repair)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $clusterName

Required. The cluster name.

RepairClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (clusters.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Operation start(string $projectId, string $region, string $clusterName, StartClusterRequest $postBody, array $optParams = [])

Starts a cluster in a project. (clusters.start)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $clusterName

Required. The cluster name.

StartClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation stop(string $projectId, string $region, string $clusterName, StopClusterRequest $postBody, array $optParams = [])

Stops a cluster in a project. (clusters.stop)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project the cluster belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $clusterName

Required. The cluster name.

StopClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (clusters.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception