class AccessPolicies extends Resource (View source)

The "accessPolicies" collection of methods.

Typical usage is:

 $accesscontextmanagerService = new Google\Service\AccessContextManager(...);
 $accessPolicies = $accesscontextmanagerService->accessPolicies;

Methods

create(AccessPolicy $postBody, array $optParams = [])

Creates an access policy. This method fails if the organization already has an access policy. The long-running operation has a successful status after the access policy propagates to long-lasting storage. Syntactic and basic semantic errors are returned in metadata as a BadRequest proto.

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

Deletes an access policy based on the resource name. The long-running operation has a successful status after the access policy is removed from long-lasting storage. (accessPolicies.delete)

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

Returns an access policy based on the name. (accessPolicies.get)

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

Gets the IAM policy for the specified Access Context Manager access policy.

listAccessPolicies(array $optParams = [])

Lists all access policies in an organization.

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

Updates an access policy. The long-running operation from this RPC has a successful status after the changes to the access policy propagate to long- lasting storage. (accessPolicies.patch)

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

Sets the IAM policy for the specified Access Context Manager access policy.

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

Returns the IAM permissions that the caller has on the specified Access Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or ServicePerimeter. This method does not support other resources.

Details

Operation create(AccessPolicy $postBody, array $optParams = [])

Creates an access policy. This method fails if the organization already has an access policy. The long-running operation has a successful status after the access policy propagates to long-lasting storage. Syntactic and basic semantic errors are returned in metadata as a BadRequest proto.

(accessPolicies.create)

Parameters

AccessPolicy $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Deletes an access policy based on the resource name. The long-running operation has a successful status after the access policy is removed from long-lasting storage. (accessPolicies.delete)

Parameters

string $name

Required. Resource name for the access policy to delete. Format accessPolicies/{policy_id}

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Returns an access policy based on the name. (accessPolicies.get)

Parameters

string $name

Required. Resource name for the access policy to get. Format accessPolicies/{policy_id}

array $optParams

Optional parameters.

Return Value

AccessPolicy

Exceptions

Exception

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

Gets the IAM policy for the specified Access Context Manager access policy.

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

ListAccessPoliciesResponse listAccessPolicies(array $optParams = [])

Lists all access policies in an organization.

(accessPolicies.listAccessPolicies)

Parameters

array $optParams

Optional parameters.

Return Value

ListAccessPoliciesResponse

Exceptions

Exception

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

Updates an access policy. The long-running operation from this RPC has a successful status after the changes to the access policy propagate to long- lasting storage. (accessPolicies.patch)

Parameters

string $name

Output only. Identifier. Resource name of the AccessPolicy. Format: accessPolicies/{access_policy}

AccessPolicy $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Sets the IAM policy for the specified Access Context Manager access policy.

This method replaces the existing IAM policy on the access policy. The IAM policy controls the set of users who can perform specific operations on the Access Context Manager access policy. (accessPolicies.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 IAM permissions that the caller has on the specified Access Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or ServicePerimeter. This method does not support other resources.

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