class ProjectsLocationsAuthorizationPolicies extends Resource (View source)

The "authorizationPolicies" collection of methods.

Typical usage is:

 $networksecurityService = new Google\Service\NetworkSecurity(...);
 $authorizationPolicies = $networksecurityService->projects_locations_authorizationPolicies;

Methods

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

Creates a new AuthorizationPolicy in a given project and location.

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

Deletes a single AuthorizationPolicy. (authorizationPolicies.delete)

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

Gets details of a single AuthorizationPolicy. (authorizationPolicies.get)

getIamPolicy(string $resource, 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.

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

Lists AuthorizationPolicies in a given project and location.

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

Updates the parameters of a single AuthorizationPolicy.

setIamPolicy(string $resource, GoogleIamV1SetIamPolicyRequest $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. (authorizationPolicies.setIamPolicy)

testIamPermissions(string $resource, GoogleIamV1TestIamPermissionsRequest $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 $parent, AuthorizationPolicy $postBody, array $optParams = [])

Creates a new AuthorizationPolicy in a given project and location.

(authorizationPolicies.create)

Parameters

string $parent

Required. The parent resource of the AuthorizationPolicy. Must be in the format projects/{project}/locations/{location}.

AuthorizationPolicy $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Deletes a single AuthorizationPolicy. (authorizationPolicies.delete)

Parameters

string $name

Required. A name of the AuthorizationPolicy to delete. Must be in the format projects/{project}/locations/{location}/authorizationPolicies.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Gets details of a single AuthorizationPolicy. (authorizationPolicies.get)

Parameters

string $name

Required. A name of the AuthorizationPolicy to get. Must be in the format projects/{project}/locations/{location}/authorizationPolicies.

array $optParams

Optional parameters.

Return Value

AuthorizationPolicy

Exceptions

Exception

GoogleIamV1Policy getIamPolicy(string $resource, 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.

(authorizationPolicies.getIamPolicy)

Parameters

string $resource

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

array $optParams

Optional parameters.

Return Value

GoogleIamV1Policy

Exceptions

Exception

ListAuthorizationPoliciesResponse listProjectsLocationsAuthorizationPolicies(string $parent, array $optParams = [])

Lists AuthorizationPolicies in a given project and location.

(authorizationPolicies.listProjectsLocationsAuthorizationPolicies)

Parameters

string $parent

Required. The project and location from which the AuthorizationPolicies should be listed, specified in the format projects/{project}/locations/{location}.

array $optParams

Optional parameters.

Return Value

ListAuthorizationPoliciesResponse

Exceptions

Exception

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

Updates the parameters of a single AuthorizationPolicy.

(authorizationPolicies.patch)

Parameters

string $name

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/.

AuthorizationPolicy $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

GoogleIamV1Policy setIamPolicy(string $resource, GoogleIamV1SetIamPolicyRequest $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. (authorizationPolicies.setIamPolicy)

Parameters

string $resource

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

GoogleIamV1SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleIamV1Policy

Exceptions

Exception

GoogleIamV1TestIamPermissionsResponse testIamPermissions(string $resource, GoogleIamV1TestIamPermissionsRequest $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. (authorizationPolicies.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.

GoogleIamV1TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleIamV1TestIamPermissionsResponse

Exceptions

Exception