MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / updateSecret

Function updateSecret

secret-manager/updateSecret.js:30–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 const client = new SecretManagerServiceClient();
29
30 async function updateSecret() {
31 const [secret] = await client.updateSecret({
32 secret: {
33 name: name,
34 labels: {
35 secretmanager: 'rocks',
36 },
37 },
38 updateMask: {
39 paths: ['labels'],
40 },
41 });
42
43 console.info(`Updated secret ${secret.name}`);
44 }
45
46 updateSecret();
47 // [END secretmanager_update_secret]

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected