async function main(projectId, parameterId, parameterVersionId, payload) {
  // [START parametermanager_create_param_version]
  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  // const projectId = 'YOUR_PROJECT_ID';
  // const parameterId = 'YOUR_PARAMETER_ID';
  // const parameterVersionId = 'YOUR_PARAMETER_VERSION_ID';
  // const payload = 'This is unstructured data';

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

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

  async function createParamVersion() {
    // Construct the parent resource name
    const parent = client.parameterPath(projectId, 'global', parameterId);

    // Construct the parameter version
    const parameterVersion = {
      payload: {
        data: Buffer.from(payload, 'utf8'),
      },
    };

    // Construct the request
    const request = {
      parent: parent,
      parameterVersionId: parameterVersionId,
      parameterVersion: parameterVersion,
    };

    // Create the parameter version
    const [paramVersion] = await client.createParameterVersion(request);
    console.log(`Created parameter version: ${paramVersion.name}`);
    return paramVersion;
  }

  return await createParamVersion();
  // [END parametermanager_create_param_version]
}
Creates a parameter version globally for unstructured data.

@param {string} projectId - The Google Cloud project ID where the parameter is to be created
@param {string} parameterId - The ID of the parameter for which the version is to be created.
@param {string} parameterVersionId - The ID of the parameter version to be created.
@param {string} payload - The unformatted string payload to be stored in the new parameter version.