class ProjectsLocationsDataPolicies extends Resource (View source)

The "dataPolicies" collection of methods.

Typical usage is:

 $bigquerydatapolicyService = new Google\Service\BigQueryDataPolicyService(...);
 $dataPolicies = $bigquerydatapolicyService->projects_locations_dataPolicies;

Methods

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

Creates a new data policy under a project with the given dataPolicyId (used as the display name), policy tag, and data policy type. (dataPolicies.create)

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

Deletes the data policy specified by its resource name. (dataPolicies.delete)

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

Gets the data policy specified by its resource name. (dataPolicies.get)

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

Gets the IAM policy for the specified data policy.

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

List all of the data policies in the specified parent project.

patch(string $name, DataPolicy $postBody, array $optParams = [])

Updates the metadata for an existing data policy. The target data policy can be specified by the resource name. (dataPolicies.patch)

rename(string $name, RenameDataPolicyRequest $postBody, array $optParams = [])

Renames the id (display name) of the specified data policy.

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

Sets the IAM policy for the specified data policy.

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

Returns the caller's permission on the specified data policy resource.

Details

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

Creates a new data policy under a project with the given dataPolicyId (used as the display name), policy tag, and data policy type. (dataPolicies.create)

Parameters

string $parent

Required. Resource name of the project that the data policy will belong to. The format is projects/{project_number}/locations/{location_id}.

DataPolicy $postBody
array $optParams

Optional parameters.

Return Value

DataPolicy

Exceptions

Exception

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

Deletes the data policy specified by its resource name. (dataPolicies.delete)

Parameters

string $name

Required. Resource name of the data policy to delete. Format is projects/{project_number}/locations/{location_id}/dataPolicies/{da ta_policy_id}.

array $optParams

Optional parameters.

Return Value

BigquerydatapolicyEmpty

Exceptions

Exception

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

Gets the data policy specified by its resource name. (dataPolicies.get)

Parameters

string $name

Required. Resource name of the requested data policy. Format is projects/{project_number}/locations/{location_id}/dataPolicies/{da ta_policy_id}.

array $optParams

Optional parameters.

Return Value

DataPolicy

Exceptions

Exception

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

Gets the IAM policy for the specified data policy.

(dataPolicies.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListDataPoliciesResponse listProjectsLocationsDataPolicies(string $parent, array $optParams = [])

List all of the data policies in the specified parent project.

(dataPolicies.listProjectsLocationsDataPolicies)

Parameters

string $parent

Required. Resource name of the project for which to list data policies. Format is projects/{project_number}/locations/{location_id}.

array $optParams

Optional parameters.

Return Value

ListDataPoliciesResponse

Exceptions

Exception

DataPolicy patch(string $name, DataPolicy $postBody, array $optParams = [])

Updates the metadata for an existing data policy. The target data policy can be specified by the resource name. (dataPolicies.patch)

Parameters

string $name

Output only. Resource name of this data policy, in the format of projects/{project_number}/locations/{location_id}/dataPolicies/{da ta_policy_id}.

DataPolicy $postBody
array $optParams

Optional parameters.

Return Value

DataPolicy

Exceptions

Exception

DataPolicy rename(string $name, RenameDataPolicyRequest $postBody, array $optParams = [])

Renames the id (display name) of the specified data policy.

(dataPolicies.rename)

Parameters

string $name

Required. Resource name of the data policy to rename. The format is projects/{project_number}/locations/{location_id}/dataPolicies/{da ta_policy_id}

RenameDataPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

DataPolicy

Exceptions

Exception

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

Sets the IAM policy for the specified data policy.

(dataPolicies.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See 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 the caller's permission on the specified data policy resource.

(dataPolicies.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception