Skip to main content

user_workloads_secrets

Creates, updates, deletes, gets or lists a user_workloads_secrets resource.

Overview

Nameuser_workloads_secrets
TypeResource
Idgoogle.composer.user_workloads_secrets

Fields

NameDatatypeDescription
namestringIdentifier. The resource name of the Secret, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}"
dataobjectOptional. 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/

Methods

NameAccessible byRequired ParamsDescription
getSELECTenvironmentsId, locationsId, projectsId, userWorkloadsSecretsIdGets an existing user workloads Secret. Values of the "data" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
listSELECTenvironmentsId, locationsId, projectsIdLists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
createINSERTenvironmentsId, locationsId, projectsIdCreates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
deleteDELETEenvironmentsId, locationsId, projectsId, userWorkloadsSecretsIdDeletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
updateREPLACEenvironmentsId, locationsId, projectsId, userWorkloadsSecretsIdUpdates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

SELECT examples

Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.

SELECT
name,
data
FROM google.composer.user_workloads_secrets
WHERE environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new user_workloads_secrets resource.

/*+ create */
INSERT INTO google.composer.user_workloads_secrets (
environmentsId,
locationsId,
projectsId,
name,
data
)
SELECT
'{{ environmentsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ data }}'
;

REPLACE example

Replaces all fields in the specified user_workloads_secrets resource.

/*+ update */
REPLACE google.composer.user_workloads_secrets
SET
name = '{{ name }}',
data = '{{ data }}'
WHERE
environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND userWorkloadsSecretsId = '{{ userWorkloadsSecretsId }}';

DELETE example

Deletes the specified user_workloads_secrets resource.

/*+ delete */
DELETE FROM google.composer.user_workloads_secrets
WHERE environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND userWorkloadsSecretsId = '{{ userWorkloadsSecretsId }}';