---
title: "POST /v1/{+parent}/userWorkloadsSecrets"
method: POST
path: "/v1/{+parent}/userWorkloadsSecrets"
tags: ["projects"]
---

# POST /v1/{+parent}/userWorkloadsSecrets

`POST /v1/{+parent}/userWorkloadsSecrets`

Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3-airflow-*.*.*-build.* and newer.

## Path parameters

- `parent` string, required

## Request body

- UserWorkloadsSecret — User workloads Secret used by Airflow tasks that run with Kubernetes executor or KubernetesPodOperator.
  - `name` string — Identifier. The resource name of the Secret, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}"
  - `data` object — Optional. The "data" field of Kubernetes Secret, organized in key-value pairs, which can contain sensitive values such as a password, a token, or a key. The values for all keys have to be base64-encoded strings. For details see: https://kubernetes.io/docs/concepts/configuration/secret/ Example: { "example": "ZXhhbXBsZV92YWx1ZQ==", "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" }

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/composer.md) · [All operations](https://skmtc.dev/google/apis/composer/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/composer/revisions/6b68932082fa/schema)
