class ProjectsLocationsAutoscalingPolicies extends Resource (View source)

The "autoscalingPolicies" collection of methods.

Typical usage is:

 $dataprocService = new Google\Service\Dataproc(...);
 $autoscalingPolicies = $dataprocService->projects_locations_autoscalingPolicies;

Methods

create(string $parent, AutoscalingPolicy $postBody, array $optParams = [])

Creates new autoscaling policy. (autoscalingPolicies.create)

delete(string $name, array $optParams = [])

Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters. (autoscalingPolicies.delete)

get(string $name, array $optParams = [])

Retrieves autoscaling policy. (autoscalingPolicies.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.

listProjectsLocationsAutoscalingPolicies(string $parent, array $optParams = [])

Lists autoscaling policies in the project.

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. (autoscalingPolicies.setIamPolicy)

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.

update(string $name, AutoscalingPolicy $postBody, array $optParams = [])

Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements. (autoscalingPolicies.update)

Details

AutoscalingPolicy create(string $parent, AutoscalingPolicy $postBody, array $optParams = [])

Creates new autoscaling policy. (autoscalingPolicies.create)

Parameters

string $parent

Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.create, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.autoscalingPolicies.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}

AutoscalingPolicy $postBody
array $optParams

Optional parameters.

Return Value

AutoscalingPolicy

Exceptions

Exception

DataprocEmpty delete(string $name, array $optParams = [])

Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters. (autoscalingPolicies.delete)

Parameters

string $name

Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

array $optParams

Optional parameters.

Return Value

DataprocEmpty

Exceptions

Exception

AutoscalingPolicy get(string $name, array $optParams = [])

Retrieves autoscaling policy. (autoscalingPolicies.get)

Parameters

string $name

Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

array $optParams

Optional parameters.

Return Value

AutoscalingPolicy

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.

(autoscalingPolicies.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

ListAutoscalingPoliciesResponse listProjectsLocationsAutoscalingPolicies(string $parent, array $optParams = [])

Lists autoscaling policies in the project.

(autoscalingPolicies.listProjectsLocationsAutoscalingPolicies)

Parameters

string $parent

Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}

array $optParams

Optional parameters.

Return Value

ListAutoscalingPoliciesResponse

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. (autoscalingPolicies.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

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. (autoscalingPolicies.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

AutoscalingPolicy update(string $name, AutoscalingPolicy $postBody, array $optParams = [])

Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements. (autoscalingPolicies.update)

Parameters

string $name

Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

AutoscalingPolicy $postBody
array $optParams

Optional parameters.

Return Value

AutoscalingPolicy

Exceptions

Exception