v27

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

Update an existing policy

Updates an existing MaaSAuthPolicy resource. K8s calls: PUT /k8s/v1/maasauthpolicy/:name

put/api/v1/update-policy/{name}

Path parameters

namestring required

Name of the MaaSAuthPolicy to update

Request body

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

{
  "modelRefs": [
    {
      "name": "llama-2-7b-chat",
      "namespace": "maas-models"
    }
  ],
  "subjects": {
    "groups": [
      {
        "name": "premium-users"
      }
    ]
  },
  "meteringMetadata": {
    "organizationId": "org-123",
    "costCenter": "engineering"
  }
}

Response

Policy updated 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"
  }
}