How to use the @google-cloud/dataproc.v1.v1 function in @google-cloud/dataproc

To help you get started, we’ve selected a few @google-cloud/dataproc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / nodejs-dataproc / samples / createCluster.js View on Github external
function main(projectId, region, clusterName) {
  // [START dataproc_create_cluster]
  const dataproc = require('@google-cloud/dataproc').v1;

  // Create a client with the endpoint set to the desired cluster region
  const client = new dataproc.v1.ClusterControllerClient({
    apiEndpoint: `${region}-dataproc.googleapis.com`,
  });

  async function createCluster() {
    // TODO(developer): Uncomment and set the following variables
    // projectId = 'YOUR_PROJECT_ID'
    // region = 'YOUR_CLUSTER_REGION'
    // clusterName = 'YOUR_CLUSTER_NAME'

    // Create the cluster config
    const request = {
      projectId: projectId,
      region: region,
      cluster: {
        clusterName: clusterName,
        config: {

@google-cloud/dataproc

Google Cloud Dataproc API client for Node.js

Apache-2.0
Latest version published 12 days ago

Package Health Score

87 / 100
Full package analysis

Popular @google-cloud/dataproc functions