NVIDIA Run:ai Policy API

Policies allow administrators to impose restrictions and set default values for researcher workloads. Restrictions and default values can be placed on CPUs, GPUs, and other resources or entities. For more information, see [Policies](https://run-ai-docs.nvidia.com/saas/platform-management/policies/#introduction).

OpenAPI Specification

runai-policy-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: latest
  description: '# Introduction


    The NVIDIA Run:ai Control-Plane API reference is a guide that provides an easy-to-use programming interface for adding various tasks to your application, including workload submission, resource management, and administrative operations.


    NVIDIA Run:ai APIs are accessed using *bearer tokens*. To obtain a token, you need to create a **Service account** through the NVIDIA Run:ai user interface.

    To create a service account, in your UI, go to Access → Service Accounts (for organization-level service accounts) or User settings → Access Keys (for user access keys), and create a new one.


    After you have created a new service account, you will need to assign it access rules.

    To assign access rules to the service account, see [Create access rules](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/accessrules#create-or-delete-rules).

    Make sure you assign the correct rules to your service account. Use the [Roles](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/roles) to assign the correct access rules.


    To get your access token, follow the instructions in [Request a token](https://run-ai-docs.nvidia.com/saas/reference/api/rest-auth/#request-an-api-token).

    '
  title: NVIDIA Run:ai Access Keys Policy API
  x-logo:
    url: https://api.redocly.com/registry/raw/runai-xq8/saas/latest/public/runai-logo-api.png
    altText: NVIDIA Run:ai
    href: https://run.ai
  license:
    name: NVIDIA Run:ai
    url: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/
servers:
- url: https://app.run.ai
security:
- bearerAuth: []
tags:
- name: Policy
  description: "Policies allow administrators to impose restrictions and set default values for researcher workloads. \nRestrictions and default values can be placed on CPUs, GPUs, and other resources or entities. \nFor more information, see [Policies](https://run-ai-docs.nvidia.com/saas/platform-management/policies/#introduction).\n"
paths:
  /api/v2/policy:
    get:
      summary: List policies
      description: Retrieve a list of all the applied policies.
      operationId: list_policies
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/WorkloadType'
      - name: scope
        in: query
        required: false
        description: filter by this scope.
        schema:
          type: string
          enum:
          - tenant
          - cluster
          - department
          - project
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/IncludeFallbackPolicies'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/trainings:
    patch:
      summary: Update a training policy.
      description: Use to apply changes to a training policy for a given organizational unit.
      operationId: update_training_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingPolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a training policy.
      description: Use to apply a training policy for a given organizational unit.
      operationId: overwrite_training_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingPolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a training policy.
      description: Retrieve the details of a training policy for a given organizational unit.
      operationId: get_training_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a training policy.
      description: Use to delete a training policy for a given organizational unit.
      operationId: delete_training_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/workspaces:
    patch:
      summary: Update a workspace policy.
      description: Use to apply changes to a workspace policy for a given organizational unit.
      operationId: update_workspace_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspacePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a workspace policy.
      description: Ue to apply a workspace policy for a given organizational unit.
      operationId: overwrite_workspace_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspacePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a workspace policy.
      description: Retrieve the details of a workspace policy for a given organizational unit.
      operationId: get_workspace_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a workspace policy.
      description: Use to delete a workspace policy for a given organizational unit.
      operationId: delete_workspace_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/distributed:
    patch:
      summary: Update a distributed policy.
      description: Use to apply changes to a distributed policy for a given organizational unit.
      operationId: update_distributed_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedPolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a distributed policy.
      description: Use to apply a distributed policy for a given organizational unit.
      operationId: overwrite_distributed_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedPolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a distributed policy.
      description: Retrieve the details of a distributed policy for a given organizational unit.
      operationId: get_distributed_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a distributed policy.
      description: Use to delete a distributed policy for a given organizational unit.
      operationId: delete_distributed_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/inferences:
    patch:
      summary: Update an inference policy.
      description: Use to apply changes to an inference policy for a given organizational unit.
      operationId: update_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferencePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite an inference policy.
      description: Use to apply an inference policy for a given organizational unit.
      operationId: overwrite_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferencePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get an inference policy.
      description: Retrieve the details of an inference policy for a given organizational unit.
      operationId: get_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an inference policy.
      description: Use to delete an inference policy for a given organizational unit.
      operationId: delete_inference_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/distributed-inferences:
    patch:
      summary: Update a distributed inference policy.
      description: Use to apply changes to a distributed inference policy for a given organizational unit.
      operationId: update_distributed_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedInferencePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedInferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a distributed inference policy.
      description: Use to apply a distributed inference policy for a given organizational unit.
      operationId: overwrite_distributed_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedInferencePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedInferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a distributed inference policy.
      description: Retrieve the details of a distributed inference policy for a given organizational unit.
      operationId: get_distributed_inference_policy_v2
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedInferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a distributed inference policy.
      description: Use to delete a distributed inference policy for a given organizational unit.
      operationId: delete_distributed_inference_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/ApproveClusterDeletion'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/nim-services:
    patch:
      summary: Update NVIDIA NIM service policy.
      description: Use to apply changes to NVIDIA NIM service policy for a given organizational unit.
      operationId: update_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NimServicePolicyChangeRequest'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NimServicePolicy'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite NVIDIA NIM service policy.
      description: Use to apply NVIDIA NIM service policy for a given organizational unit.
      operationId: overwrite_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NimServicePolicyOverwriteRequest'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NimServicePolicy'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get NVIDIA NIM service policy.
      description: Retrieve the details of NVIDIA NIM service policy for a given organizational unit.
      operationId: get_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NimServicePolicy'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete NVIDIA NIM service policy.
      description: Use to delete NVIDIA NIM service policy for a given organizational unit.
      operationId: delete_nim_service_policy
      tags:
      - Policy
      parameters:
      - $ref: '#/components/parameters/PolicyScope'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/FilterByProject'
      - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
components:
  schemas:
    S3Common:
      properties:
        bucket:
          description: The name of the bucket. (mandatory)
          type: string
          minLength: 1
          example: my-bucket
          nullable: true
        path:
          description: Local path within the workload to which the S3 bucket will be mapped. (mandatory)
          type: string
          minLength: 1
          example: /container/my-bucket
          nullable: true
        url:
          description: The url of the S3 service provider. The default is the URL of the Amazon AWS S3 service.
          type: string
          minLength: 1
          example: https://s3.amazonaws.com
          nullable: true
      nullable: true
      type: object
    SecretRules:
      properties:
        secret:
          $ref: '#/components/schemas/StringRules'
        mountPath:
          $ref: '#/components/schemas/StringRules'
        defaultMode:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    PortServiceTypeOptions:
      properties:
        options:
          type: array
          items:
            required:
            - value
            properties:
              value:
                $ref: '#/components/schemas/PortServiceType'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
                pattern: .*
          nullable: true
      nullable: true
      type: object
    AutoScalingMetricField:
      properties:
        metric:
          $ref: '#/components/schemas/AutoScalingMetric'
    TrainingPolicyRulesV2:
      allOf:
      - nullable: true
        properties:
          annotations:
            $ref: '#/components/schemas/InstancesRules'
          args:
            $ref: '#/components/schemas/StringRules'
          autoDeletionTimeAfterCompletionSeconds:
            $ref: '#/components/schemas/IntegerRules'
          backoffLimit:
            $ref: '#/components/schemas/IntegerRules'
          category:
            $ref: '#/components/schemas/StringRules'
          command:
            $ref: '#/components/schemas/StringRules'
          completions:
            $ref: '#/components/schemas/IntegerRules'
          compute:
            nullable: true
            properties:
              cpuCoreLimit:
                $ref: '#/components/schemas/NumberRules'
              cpuCoreRequest:
                $ref: '#/components/schemas/NumberRules'
              cpuMemoryLimit:
                $ref: '#/components/schemas/QuantityRules'
              cpuMemoryRequest:
                $ref: '#/components/schemas/QuantityRules'
              extendedResources:
                $ref: '#/components/schemas/ExtendedResourcesRules'
              gpuDevicesRequest:
                $ref: '#/components/schemas/IntegerRules'
              gpuMemoryLimit:
                $ref: '#/components/schemas/QuantityRules'
              gpuMemoryRequest:
                $ref: '#/components/schemas/QuantityRules'
              gpuPortionLimit:
                $ref: '#/components/schemas/NumberRules'
              gpuPortionRequest:
                $ref: '#/components/schemas/NumberRules'
              gpuRequestType:
                $ref: '#/components/schemas/GpuRequestRules'
              largeShmRequest:
                $ref: '#/components/schemas/BooleanRules'
            type: object
          createHomeDir:
            $ref: '#/components/schemas/BooleanRules'
          environmentVariables:
            $ref: '#/components/schemas/InstancesRules'
          exposedUrls:
            $ref: '#/components/schemas/ExposedUrlsRules'
          image:
            $ref: '#/components/schemas/StringRules'
          imagePullPolicy:
            $ref: '#/components/schemas/ImagePullPolicyRules'
          imagePullSecrets:
            $ref: '#/components/schemas/ImagePullSecretsRules'
          labels:
            $ref: '#/components/schemas/InstancesRules'
          nodeAffinityRequired:
            $ref: '#/components/schemas/ArbitraryRules'
          nodePools:
            $ref: '#/components/schemas/ArrayRules'
          nodeType:
            $ref: '#/components/schemas/StringRules'
          parallelism:
            $ref: '#/components/schemas/IntegerRules'
          podAffinity:
            $ref: '#/components/schemas/PodAffinityRules'
          ports:
            $ref: '#/components/schemas/PortsRules'
          preemptibility:
            $ref: '#/components/schemas/PreemptibilityRules'
          priorityClass:
            $ref: '#/components/schemas/StringRules'
          probes:
            $ref: '#/components/schemas/ProbesRules'
          relatedUrls:
            $ref: '#/components/schemas/RelatedUrlsRules'
          restartPolicy:
            $ref: '#/components/schemas/RestartPolicyRule'
          security:
            nullable: true
            properties:
              allowPrivilegeEscalation:
                $ref: '#/components/schemas/BooleanRules'
              capabilities:
                $ref: '#/components/schemas/ArrayRules'
              hostIpc:
                $ref: '#/components/schemas/BooleanRule

# --- truncated at 32 KB (227 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/runai/refs/heads/main/openapi/runai-policy-api-openapi.yml