/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import { fileURLToPath } from "url"; // snippet-start:[javascript.v3.medical-imaging.hello] import { ListDatastoresCommand, MedicalImagingClient, } from "@aws-sdk/client-medical-imaging"; // When no region or credentials are provided, the SDK will use the // region and credentials from the local AWS config. const client = new MedicalImagingClient({}); export const helloMedicalImaging = async () => { const command = new ListDatastoresCommand({}); const { datastoreSummaries } = await client.send(command); console.log("Datastores: "); console.log(datastoreSummaries.map((item) => item.datastoreName).join("\n")); return datastoreSummaries; }; // snippet-end:[javascript.v3.medical-imaging.hello] // Invoke main function if this file was run directly. if (process.argv[1] === fileURLToPath(import.meta.url)) { helloMedicalImaging(); }