v27

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-01304498.9 KB
policies

Create a new policy

Creates a new MaaSAuthPolicy resource. K8s calls: CREATE /k8s/v1/maasauthpolicy

post/api/v1/new-policy

Request body

namestring required

Name for the MaaSAuthPolicy resource

displayNamestring

Human-readable display name (stored as openshift.io/display-name annotation)

descriptionstring

Description of the policy (stored as openshift.io/description annotation)

Example request

{
  "name": "team-alpha-policy",
  "displayName": "Team Alpha Policy",
  "description": "Grants Team Alpha access to LLM models",
  "modelRefs": [
    {
      "name": "llama-2-7b-chat",
      "namespace": "maas-models"
    }
  ],
  "subjects": {
    "groups": [
      {
        "name": "premium-users"
      }
    ]
  },
  "meteringMetadata": {
    "organizationId": "org-123",
    "costCenter": "engineering"
  }
}

Response

Policy created successfully

namestring required

Name of the MaaSAuthPolicy resource

namespacestring required

Namespace of the MaaSAuthPolicy resource

displayNamestring

Human-readable display name for the policy

descriptionstring

Description of the policy

phase'Pending' | 'Active' | 'Failed'

Current phase of the auth policy (from status)

statusMessagestring

Human-readable status message from the Ready condition in status.conditions

creationTimestampstring date-time

Timestamp when the policy was created

deletionTimestampstring date-time

When set, the policy is marked for deletion (Kubernetes metadata.deletionTimestamp)

Example response

{
  "name": "premium-team-sub-policy",
  "namespace": "maas-system",
  "displayName": "Premium Team Policy",
  "description": "High-priority access policy for the premium team.",
  "phase": "Active",
  "statusMessage": "successfully reconciled",
  "creationTimestamp": "2025-03-01T10:00:00Z",
  "modelRefs": [
    {
      "name": "llama-2-7b-chat",
      "namespace": "maas-models"
    }
  ],
  "subjects": {
    "groups": [
      {
        "name": "premium-users"
      }
    ]
  },
  "meteringMetadata": {
    "organizationId": "org-123",
    "costCenter": "engineering"
  }
}