| 9 | } from "@aws-sdk/client-entityresolution"; |
| 10 | |
| 11 | export const main = async () => { |
| 12 | const region = "eu-west-1"; |
| 13 | const erClient = new EntityResolutionClient({ region: region }); |
| 14 | try { |
| 15 | const command = new ListMatchingWorkflowsCommand({}); |
| 16 | const response = await erClient.send(command); |
| 17 | const workflowSummaries = response.workflowSummaries; |
| 18 | for (const workflowSummary of workflowSummaries) { |
| 19 | console.log(`Attribute name: ${workflowSummaries[0].workflowName} `); |
| 20 | } |
| 21 | if (workflowSummaries.length === 0) { |
| 22 | console.log("No matching workflows found."); |
| 23 | } |
| 24 | } catch (error) { |
| 25 | console.error( |
| 26 | `An error occurred in listing the workflow summaries: ${error.message} \n Exiting program.`, |
| 27 | ); |
| 28 | return; |
| 29 | } |
| 30 | }; |
| 31 | |
| 32 | // snippet-end:[javascript.v3.entity-resolution.hello] |
| 33 | |