- HTTP request
 - Path parameters
 - Query parameters
 - Request body
 - Response body
 - Authorization scopes
 - IAM Permissions
 - Try it!
 
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
POST https://osconfig.googleapis.com/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent | 
                
                   
 Required. The parent resource name in the form: projects/{project}/locations/{location}  | 
              
Query parameters
| Parameters | |
|---|---|
osPolicyAssignmentId | 
                
                   
 Required. The logical name of the OS policy assignment in the project with the following restrictions: 
  | 
              
requestId | 
                
                   
 Optional. A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a   | 
              
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:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the parent resource:
osconfig.osPolicyAssignments.create
For more information, see the IAM documentation.