clients/client-cleanroomsml/README.md
AWS SDK for JavaScript CleanRoomsML Client for Node.js, Browser and React Native.
<p>Welcome to the <i>Amazon Web Services Clean Rooms ML API Reference</i>.</p> <p>Amazon Web Services Clean Rooms ML provides a privacy-enhancing method for two parties to identify similar users in their data without the need to share their data with each other. The first party brings the training data to Clean Rooms so that they can create and configure an audience model (lookalike model) and associate it with a collaboration. The second party then brings their seed data to Clean Rooms and generates an audience (lookalike segment) that resembles the training data.</p> <p>To learn more about Amazon Web Services Clean Rooms ML concepts, procedures, and best practices, see the <a href="https://docs.aws.amazon.com/clean-rooms/latest/userguide/machine-learning.html">Clean Rooms User Guide</a>.</p> <p>To learn more about SQL commands, functions, and conditions supported in Clean Rooms, see the <a href="https://docs.aws.amazon.com/clean-rooms/latest/sql-reference/sql-reference.html">Clean Rooms SQL Reference</a>.</p> <p/>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-cleanroomsmlyarn add @aws-sdk/client-cleanroomsmlpnpm add @aws-sdk/client-cleanroomsmlThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the CleanRoomsMLClient and
the commands you need, for example ListAudienceExportJobsCommand:
// ES5 example
const { CleanRoomsMLClient, ListAudienceExportJobsCommand } = require("@aws-sdk/client-cleanroomsml");
// ES6+ example
import { CleanRoomsMLClient, ListAudienceExportJobsCommand } from "@aws-sdk/client-cleanroomsml";
To send a request:
send operation on the client, providing the command object as input.const client = new CleanRoomsMLClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListAudienceExportJobsCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
CleanRoomsML extends CleanRoomsMLClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (CleanRoomsMLClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { CleanRoomsML } from "@aws-sdk/client-cleanroomsml";
const client = new CleanRoomsML({ region: "REGION" });
// async/await.
try {
const data = await client.listAudienceExportJobs(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listAudienceExportJobs(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listAudienceExportJobs(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-cleanroomsml package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> CancelTrainedModelInferenceJob </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateAudienceModel </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateConfiguredAudienceModel </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateConfiguredModelAlgorithm </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateConfiguredModelAlgorithmAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateMLInputChannel </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateTrainedModel </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateTrainingDataset </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteAudienceGenerationJob </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteAudienceModel </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteConfiguredAudienceModel </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteConfiguredAudienceModelPolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteConfiguredModelAlgorithm </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteConfiguredModelAlgorithmAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteMLConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteMLInputChannelData </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteTrainedModelOutput </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteTrainingDataset </summary>Command API Reference / Input / Output
</details> <details> <summary> GetAudienceGenerationJob </summary>Command API Reference / Input / Output
</details> <details> <summary> GetAudienceModel </summary>Command API Reference / Input / Output
</details> <details> <summary> GetCollaborationConfiguredModelAlgorithmAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> GetCollaborationMLInputChannel </summary>Command API Reference / Input / Output
</details> <details> <summary> GetCollaborationTrainedModel </summary>Command API Reference / Input / Output
</details> <details> <summary> GetConfiguredAudienceModel </summary>Command API Reference / Input / Output
</details> <details> <summary> GetConfiguredAudienceModelPolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> GetConfiguredModelAlgorithm </summary>Command API Reference / Input / Output
</details> <details> <summary> GetConfiguredModelAlgorithmAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMLConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> GetMLInputChannel </summary>Command API Reference / Input / Output
</details> <details> <summary> GetTrainedModel </summary>Command API Reference / Input / Output
</details> <details> <summary> GetTrainedModelInferenceJob </summary>Command API Reference / Input / Output
</details> <details> <summary> GetTrainingDataset </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAudienceExportJobs </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAudienceGenerationJobs </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAudienceModels </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCollaborationConfiguredModelAlgorithmAssociations </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCollaborationMLInputChannels </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCollaborationTrainedModelExportJobs </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCollaborationTrainedModelInferenceJobs </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCollaborationTrainedModels </summary>Command API Reference / Input / Output
</details> <details> <summary> ListConfiguredAudienceModels </summary>Command API Reference / Input / Output
</details> <details> <summary> ListConfiguredModelAlgorithmAssociations </summary>Command API Reference / Input / Output
</details> <details> <summary> ListConfiguredModelAlgorithms </summary>Command API Reference / Input / Output
</details> <details> <summary> ListMLInputChannels </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTrainedModelInferenceJobs </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTrainedModels </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTrainedModelVersions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTrainingDatasets </summary>Command API Reference / Input / Output
</details> <details> <summary> PutConfiguredAudienceModelPolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> PutMLConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> StartAudienceExportJob </summary>Command API Reference / Input / Output
</details> <details> <summary> StartAudienceGenerationJob </summary>Command API Reference / Input / Output
</details> <details> <summary> StartTrainedModelExportJob </summary>Command API Reference / Input / Output
</details> <details> <summary> StartTrainedModelInferenceJob </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary> </details> <details> <summary> UpdateConfiguredAudienceModel </summary> </details>