---
title: "PATCH /storage/{storage-account-name}/sas/{sas-definition-name}"
method: PATCH
path: "/storage/{storage-account-name}/sas/{sas-definition-name}"
tags: ["Storage"]
---

# PATCH /storage/{storage-account-name}/sas/{sas-definition-name}

`PATCH /storage/{storage-account-name}/sas/{sas-definition-name}`

Updates the specified attributes associated with the given SAS definition. This operation requires the storage/setsas permission.

## Path parameters

- `storage-account-name` string, required
- `sas-definition-name` string, required

## Query parameters

- `api-version` string, required

## Request body

- SasDefinitionUpdateParameters — The SAS definition update parameters.
  - `templateUri` string — The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template.
  - `sasType` 'account' | 'service' — The type of SAS token the SAS definition will create.
  - `validityPeriod` string — The validity period of SAS tokens created according to the SAS definition.
  - `attributes` SasDefinitionAttributes — The SAS definition management attributes.
    - `enabled` boolean — the enabled state of the object.
    - `created` integer — Creation time in UTC.
    - `updated` integer — Last updated time in UTC.
    - `recoveryLevel` 'Purgeable' | 'Recoverable+Purgeable' | 'Recoverable' | 'Recoverable+ProtectedSubscription' — Reflects the deletion recovery level currently in effect for SAS definitions in the current vault. If it contains 'Purgeable' the SAS definition can be permanently deleted by a privileged user; otherwise, only the system can purge the SAS definition, at the end of the retention interval.
  - `tags` object — Application specific metadata in the form of key-value pairs.

## Response `200`

The updated SAS definition.

- SasDefinitionBundle — A SAS definition bundle consists of key vault SAS definition details plus its attributes.
  - `id` string — The SAS definition id.
  - `sid` string — Storage account SAS definition secret id.
  - `templateUri` string — The SAS definition token template signed with an arbitrary key. Tokens created according to the SAS definition will have the same properties as the template.
  - `sasType` 'account' | 'service' — The type of SAS token the SAS definition will create.
  - `validityPeriod` string — The validity period of SAS tokens created according to the SAS definition.
  - `attributes` SasDefinitionAttributes — The SAS definition management attributes.
    - `enabled` boolean — the enabled state of the object.
    - `created` integer — Creation time in UTC.
    - `updated` integer — Last updated time in UTC.
    - `recoveryLevel` 'Purgeable' | 'Recoverable+Purgeable' | 'Recoverable' | 'Recoverable+ProtectedSubscription' — Reflects the deletion recovery level currently in effect for SAS definitions in the current vault. If it contains 'Purgeable' the SAS definition can be permanently deleted by a privileged user; otherwise, only the system can purge the SAS definition, at the end of the retention interval.
  - `tags` object — Application specific metadata in the form of key-value pairs

## Other responses

- `default` — Key Vault error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/keyvaultclient.md) · [All operations](https://skmtc.net/azure/apis/keyvaultclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/keyvaultclient/revisions/1f612999ec40/schema)
