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

Function listParams

parametermanager/listParams.js:36–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 const client = new ParameterManagerClient();
35
36 async function listParams() {
37 // Construct the parent string for listing parameters globally
38 const parent = client.locationPath(projectId, 'global');
39
40 const request = {
41 parent: parent,
42 };
43
44 // Use listParametersAsync to handle pagination automatically
45 const parameters = await client.listParametersAsync(request);
46
47 for await (const parameter of parameters) {
48 console.log(
49 `Found parameter ${parameter.name} with format ${parameter.format}`
50 );
51 }
52 return parameters;
53 }
54
55 return await listParams();
56 // [END parametermanager_list_params]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected