---
title: "Creates or updates a Secret resource."
method: PUT
path: "/Resources/Secrets/{secretResourceName}"
tags: ["MeshSecrets"]
---

# Creates or updates a Secret resource.

`PUT /Resources/Secrets/{secretResourceName}`

Creates a Secret resource with the specified name, description and properties. If Secret resource with the same name exists, then it is updated with the specified description and properties. Once created, the kind and contentType of a secret resource cannot be updated.

## Path parameters

- `secretResourceName` string, required

## Query parameters

- `api-version` '6.4-preview', required

## Request body

- SecretResourceDescription — This type describes a secret resource.
  - `properties` SecretResourceProperties, required — This type describes the properties of a secret resource, including its kind.
    - `kind` 'inlinedValue' | 'keyVaultVersionedReference', required — Describes the kind of secret.
  - `name` string, required — Name of the Secret resource.

## Response `200`

OK

- SecretResourceDescription — This type describes a secret resource.
  - `properties` SecretResourceProperties, required — This type describes the properties of a secret resource, including its kind.
    - `kind` 'inlinedValue' | 'keyVaultVersionedReference', required — Describes the kind of secret.
  - `name` string, required — Name of the Secret resource.

## Other responses

- `201` — Created
- `202` — Accepted
- `default` — Error

---

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