Method: projects.locations.osPolicyAssignments.create

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.osPolicyAssignments.operations.cancel.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The parent resource name in the form: projects/{project}/locations/{location}

Query parameters



Required. The logical name of the OS policy assignment in the project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.

Request body

The request body contains an instance of OSPolicyAssignment.

Response body

If successful, the response body contains a newly created instance of Operation.

Authorization Scopes

Requires the following OAuth scope:


For more information, see the Authentication Overview.