List Composer Image Versions

Lists image versions for Cloud Composer

Code sample

Node.js

To authenticate to Cloud Composer, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

// Imports the Google Cloud client library

// remove this line after package is released
// eslint-disable-next-line node/no-missing-require
const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow');

// TODO(developer): replace with your prefered project ID.
// const projectId = 'my-project'

// Creates a client
// eslint-disable-next-line no-unused-vars
const client = new ImageVersionsClient();

async function listImageVersions() {
  const [versions] = await client.listImageVersions({
    parent: `projects/${projectId}/locations/${location}`,
  });
  console.info(versions);
}
listImageVersions();

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.