class ProjectsLocationsOsPolicyAssignments extends Resource (View source)

The "osPolicyAssignments" collection of methods.

Typical usage is:

 $osconfigService = new Google\Service\OSConfig(...);
 $osPolicyAssignments = $osconfigService->projects_locations_osPolicyAssignments;

Methods

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

Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see Method: projects.locations.osP olicyAssignments.operations.cancel.

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

Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see Method: proj ects.locations.osPolicyAssignments.operations.cancel. (osPolicyAssignments.delete)

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

Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the name parameter.

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

List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.

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

List the OS policy assignment revisions for a given OS policy assignment.

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

Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see Method: projects.locations.osP olicyAssignments.operations.cancel.

Details

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

Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see Method: projects.locations.osP olicyAssignments.operations.cancel.

(osPolicyAssignments.create)

Parameters

string $parent

Required. The parent resource name in the form: projects/{project}/locations/{location}. Note: Specify the zone of your VMs as the location.

OSPolicyAssignment $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see Method: proj ects.locations.osPolicyAssignments.operations.cancel. (osPolicyAssignments.delete)

Parameters

string $name

Required. The name of the OS policy assignment to be deleted

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the name parameter.

(osPolicyAssignments.get)

Parameters

string $name

Required. The resource name of OS policy assignment. Format: projects/{project}/locations/{location}/osPolicyAssignments/{os_poli cy_assignment}@{revisionId}

array $optParams

Optional parameters.

Return Value

OSPolicyAssignment

Exceptions

Exception

ListOSPolicyAssignmentsResponse listProjectsLocationsOsPolicyAssignments(string $parent, array $optParams = [])

List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.

(osPolicyAssignments.listProjectsLocationsOsPolicyAssignments)

Parameters

string $parent

Required. The parent resource name.

array $optParams

Optional parameters.

Return Value

ListOSPolicyAssignmentsResponse

Exceptions

Exception

ListOSPolicyAssignmentRevisionsResponse listRevisions(string $name, array $optParams = [])

List the OS policy assignment revisions for a given OS policy assignment.

(osPolicyAssignments.listRevisions)

Parameters

string $name

Required. The name of the OS policy assignment to list revisions for.

array $optParams

Optional parameters.

Return Value

ListOSPolicyAssignmentRevisionsResponse

Exceptions

Exception

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

Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see Method: projects.locations.osP olicyAssignments.operations.cancel.

(osPolicyAssignments.patch)

Parameters

string $name

Resource name. Format: projects/{project_number}/locatio ns/{location}/osPolicyAssignments/{os_policy_assignment_id} This field is ignored when you create an OS policy assignment.

OSPolicyAssignment $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception