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

Function getParam

parametermanager/getParam.js:38–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 const client = new ParameterManagerClient();
37
38 async function getParam() {
39 // Construct the fully qualified parameter name
40 const name = client.parameterPath(projectId, 'global', parameterId);
41
42 // Get the parameter
43 const [parameter] = await client.getParameter({
44 name: name,
45 });
46
47 // Find more details for the Parameter object here:
48 // https://cloud.google.com/secret-manager/parameter-manager/docs/reference/rest/v1/projects.locations.parameters#Parameter
49 console.log(
50 `Found parameter ${parameter.name} with format ${parameter.format}`
51 );
52 return parameter;
53 }
54
55 return await getParam();
56 // [END parametermanager_get_param]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected