---
title: "Update an existing policy"
method: PUT
path: "/api/v1/update-policy/{name}"
tags: ["policies"]
---

# Update an existing policy

`PUT /api/v1/update-policy/{name}`

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

## Path parameters

- `name` string, required

## Request body

- UpdatePolicyRequest — Request body for updating an existing MaaSAuthPolicy resource
  - `displayName` string — Human-readable display name (stored as openshift.io/display-name annotation)
  - `description` string — Description of the policy (stored as openshift.io/description annotation)
  - `modelRefs` ModelRef[], required — Updated models for this policy
    - `name` string, required — Name of the MaaSModelRef
    - `namespace` string, required — Namespace where the MaaSModelRef lives
  - `subjects` SubjectSpec, required — Defines subjects (groups) that have access
    - `groups` GroupReference[] — Kubernetes group names
      - `name` string, required — Name of the Kubernetes group
  - `meteringMetadata` TokenMetadata — Metadata for token usage attribution and metering
    - `organizationId` string — Organization identifier for metering and billing
    - `costCenter` string — Cost center for usage attribution
    - `labels` object — Additional labels for tracking and metrics

## Response `200`

Policy updated successfully

- MaaSAuthPolicy — BFF representation of a MaaSAuthPolicy Kubernetes custom resource
  - `name` string, required — Name of the MaaSAuthPolicy resource
  - `namespace` string, required — Namespace of the MaaSAuthPolicy resource
  - `displayName` string — Human-readable display name for the policy
  - `description` string — Description of the policy
  - `phase` 'Pending' | 'Active' | 'Failed' — Current phase of the auth policy (from status)
  - `statusMessage` string — Human-readable status message from the Ready condition in status.conditions
  - `reason` string — Reason from the Ready condition in status.conditions
  - `status` string — Status from the Ready condition in status.conditions (e.g. True, False, Unknown)
  - `conditionType` string — Condition type from the Ready condition in status.conditions
  - `lastTransitionTime` string, date-time — lastTransitionTime from the Ready condition in status.conditions
  - `creationTimestamp` string, date-time — Timestamp when the policy was created
  - `modelRefs` ModelRef[], required — Models this policy grants access to
    - `name` string, required — Name of the MaaSModelRef
    - `namespace` string, required — Namespace where the MaaSModelRef lives
  - `subjects` SubjectSpec, required — Defines subjects (groups) that have access
    - `groups` GroupReference[] — Kubernetes group names
      - `name` string, required — Name of the Kubernetes group
  - `meteringMetadata` TokenMetadata — Metadata for token usage attribution and metering
    - `organizationId` string — Organization identifier for metering and billing
    - `costCenter` string — Cost center for usage attribution
    - `labels` object — Additional labels for tracking and metrics
  - `deletionTimestamp` string, date-time — When set, the policy is marked for deletion (Kubernetes metadata.deletionTimestamp)

## Other responses

- `400` — Bad Request. Invalid update specification.
- `401` — Unauthorized
- `404` — Policy not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/opendatahub-io/apis/maas-bff-api.md) · [All operations](https://skmtc.net/opendatahub-io/apis/maas-bff-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opendatahub-io/maas-bff-api/revisions/9112415ceeca/schema)
