- release_tracks: [GA, ALPHA]

  help_text:
    brief: Create an OS policy assignment.
    description: |
      Create an OS policy assignment

      ## EXAMPLES

      To create an OS policy assignment `my-assignment` in `my-project` and location `us-central1-a` with config file `/path/to/file/config.yaml`, run:

        $ {command} my-assignment --project=my-project --location=us-central1-a --file=/path/to/file/config.yaml

  request:
    collection: osconfig.projects.locations.osPolicyAssignments
    modify_request_hooks:
    - googlecloudsdk.command_lib.compute.os_config.utils:ParseOSConfigAssignmentFile
    ALPHA:
      api_version: v1alpha
    GA:
      api_version: v1

  async:
    collection: osconfig.projects.locations.osPolicyAssignments.operations
    ALPHA:
      api_version: v1alpha
    GA:
      api_version: v1

  response:
    modify_response_hooks:
    - googlecloudsdk.command_lib.compute.os_config.utils:LogOutOperationCommandForAsyncResponse

  arguments:
    resource:
      help_text: Location to create the OS policy assignment in.
      spec: !REF googlecloudsdk.command_lib.compute.os_config.resources:create_os_policy_assignment
    params:
    - _REF_: googlecloudsdk.command_lib.compute.os_config.flags:file
