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

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

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

  async function enableParamVersion() {
    // Construct the full resource name
    const name = client.parameterVersionPath(
      projectId,
      'global',
      parameterId,
      versionId
    );

    // Construct the request
    const request = {
      parameterVersion: {
        name: name,
        disabled: false,
      },
      updateMask: {
        paths: ['disabled'],
      },
    };

    // Make the API call to update the parameter version
    const [parameterVersion] = await client.updateParameterVersion(request);

    console.log(
      `Enabled parameter version ${parameterVersion.name} for parameter ${parameterId}`
    );
    return parameterVersion;
  }

  return await enableParamVersion();
  // [END parametermanager_enable_param_version]
}
Enables a specific version of a parameter in Google Cloud Parameter Manager.
This function demonstrates how to enable a parameter version by setting
its 'disabled' field to false using the Parameter Manager client library.

@param {string} projectId - The Google Cloud project ID where the parameter is located.
@param {string} parameterId - The ID of the parameter for which version is to be enabled.
@param {string} versionId - The version ID of the parameter to be enabled.