class Policies extends Resource (View source)

The "policies" collection of methods.

Typical usage is:

 $dnsService = new Google\Service\Dns(...);
 $policies = $dnsService->policies;

Methods

create(string $project, Policy $postBody, array $optParams = [])

Creates a new Policy. (policies.create)

delete(string $project, string $policy, array $optParams = [])

Deletes a previously created Policy. Fails if the policy is still being referenced by a network. (policies.delete)

get(string $project, string $policy, array $optParams = [])

Fetches the representation of an existing Policy. (policies.get)

listPolicies(string $project, array $optParams = [])

Enumerates all Policies associated with a project. (policies.listPolicies)

patch(string $project, string $policy, Policy $postBody, array $optParams = [])

Applies a partial update to an existing Policy. (policies.patch)

update(string $project, string $policy, Policy $postBody, array $optParams = [])

Updates an existing Policy. (policies.update)

Details

Policy create(string $project, Policy $postBody, array $optParams = [])

Creates a new Policy. (policies.create)

Parameters

string $project

Identifies the project addressed by this request.

Policy $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

delete(string $project, string $policy, array $optParams = [])

Deletes a previously created Policy. Fails if the policy is still being referenced by a network. (policies.delete)

Parameters

string $project

Identifies the project addressed by this request.

string $policy

User given friendly name of the policy addressed by this request.

array $optParams

Optional parameters.

Exceptions

Exception

Policy get(string $project, string $policy, array $optParams = [])

Fetches the representation of an existing Policy. (policies.get)

Parameters

string $project

Identifies the project addressed by this request.

string $policy

User given friendly name of the policy addressed by this request.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

PoliciesListResponse listPolicies(string $project, array $optParams = [])

Enumerates all Policies associated with a project. (policies.listPolicies)

Parameters

string $project

Identifies the project addressed by this request.

array $optParams

Optional parameters.

Return Value

PoliciesListResponse

Exceptions

Exception

PoliciesPatchResponse patch(string $project, string $policy, Policy $postBody, array $optParams = [])

Applies a partial update to an existing Policy. (policies.patch)

Parameters

string $project

Identifies the project addressed by this request.

string $policy

User given friendly name of the policy addressed by this request.

Policy $postBody
array $optParams

Optional parameters.

Return Value

PoliciesPatchResponse

Exceptions

Exception

PoliciesUpdateResponse update(string $project, string $policy, Policy $postBody, array $optParams = [])

Updates an existing Policy. (policies.update)

Parameters

string $project

Identifies the project addressed by this request.

string $policy

User given friendly name of the policy addressed by this request.

Policy $postBody
array $optParams

Optional parameters.

Return Value

PoliciesUpdateResponse

Exceptions

Exception