class ProjectsPlatformsPolicies extends Resource (View source)

The "policies" collection of methods.

Typical usage is:

 $binaryauthorizationService = new Google\Service\BinaryAuthorization(...);
 $policies = $binaryauthorizationService->projects_platforms_policies;

Methods

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

Creates a platform policy, and returns a copy of it. Returns NOT_FOUND if the project or platform doesn't exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the policy already exists, and INVALID_ARGUMENT if the policy contains a platform-specific policy that does not match the platform value specified in the URL. (policies.create)

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

Deletes a platform policy. Returns NOT_FOUND if the policy doesn't exist.

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

Gets a platform policy. Returns NOT_FOUND if the policy doesn't exist.

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

Lists platform policies owned by a project in the specified platform. Returns INVALID_ARGUMENT if the project or the platform doesn't exist.

replacePlatformPolicy(string $name, PlatformPolicy $postBody, array $optParams = [])

Replaces a platform policy. Returns NOT_FOUND if the policy doesn't exist.

Details

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

Creates a platform policy, and returns a copy of it. Returns NOT_FOUND if the project or platform doesn't exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the policy already exists, and INVALID_ARGUMENT if the policy contains a platform-specific policy that does not match the platform value specified in the URL. (policies.create)

Parameters

string $parent

Required. The parent of this platform policy.

PlatformPolicy $postBody
array $optParams

Optional parameters.

Return Value

PlatformPolicy

Exceptions

Exception

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

Deletes a platform policy. Returns NOT_FOUND if the policy doesn't exist.

(policies.delete)

Parameters

string $name

Required. The name of the platform policy to delete, in the format projects/platforms/policies.

array $optParams

Optional parameters.

Return Value

BinaryauthorizationEmpty

Exceptions

Exception

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

Gets a platform policy. Returns NOT_FOUND if the policy doesn't exist.

(policies.get)

Parameters

string $name

Required. The name of the platform policy to retrieve in the format projects/platforms/policies.

array $optParams

Optional parameters.

Return Value

PlatformPolicy

Exceptions

Exception

ListPlatformPoliciesResponse listProjectsPlatformsPolicies(string $parent, array $optParams = [])

Lists platform policies owned by a project in the specified platform. Returns INVALID_ARGUMENT if the project or the platform doesn't exist.

(policies.listProjectsPlatformsPolicies)

Parameters

string $parent

Required. The resource name of the platform associated with the platform policies using the format projects/platforms.

array $optParams

Optional parameters.

Return Value

ListPlatformPoliciesResponse

Exceptions

Exception

PlatformPolicy replacePlatformPolicy(string $name, PlatformPolicy $postBody, array $optParams = [])

Replaces a platform policy. Returns NOT_FOUND if the policy doesn't exist.

(policies.replacePlatformPolicy)

Parameters

string $name

Output only. The relative resource name of the Binary Authorization platform policy, in the form of projects/platforms/policies.

PlatformPolicy $postBody
array $optParams

Optional parameters.

Return Value

PlatformPolicy

Exceptions

Exception