async function main(projectId, parameterId, parameterVersionId) {
  // [START parametermanager_quickstart]
  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  // const projectId = 'my-project';
  // const parameterId = 'my-parameter';
  // const parameterVersionId = 'v1';

  // Imports the Google Cloud Parameter Manager library
  const {
    ParameterManagerClient,
    protos,
  } = require('@google-cloud/parametermanager');

  // Instantiates a client
  const client = new ParameterManagerClient();

  async function quickstart() {
    const parent = client.locationPath(projectId, 'global');
    const parameterRequest = {
      parent: parent,
      parameterId: parameterId,
      parameter: {
        format: protos.google.cloud.parametermanager.v1.ParameterFormat.JSON,
      },
    };

    // Create a new parameter
    const [parameter] = await client.createParameter(parameterRequest);
    console.log(
      `Created parameter ${parameter.name} with format ${parameter.format}`
    );

    const payload = {username: 'test-user', host: 'localhost'};
    // Create a new parameter version
    const [parameterVersion] = await client.createParameterVersion({
      parent: parameter.name,
      parameterVersionId: parameterVersionId,
      parameterVersion: {
        payload: {
          data: Buffer.from(JSON.stringify(payload), 'utf8'),
        },
      },
    });
    console.log(`Created parameter version: ${parameterVersion.name}`);

    // Get the parameter version
    const [paramVersion] = await client.getParameterVersion({
      name: parameterVersion.name,
    });
    console.log(`Retrieved parameter version: ${paramVersion.name}`);
    console.log('Payload:', paramVersion.payload.data.toString('utf8'));
    return paramVersion;
  }

  return await quickstart();
  // [END parametermanager_quickstart]
}
Quickstart example for using Google Cloud Parameter Manager to
create a global parameter, add a version with a JSON payload,
and fetch the parameter version details.

@param {string} projectId - The Google Cloud project ID where parameter is created.
@param {string} parameterId - The ID of the new parameter.
@param {string} parameterVersionId - The ID of the parameter version.