UpdateDataSourceCommand

Updates the DataSourceName of a DataSource.

You can use the GetDataSource operation to view the contents of the updated data element.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { MachineLearningClient, UpdateDataSourceCommand } from "@aws-sdk/client-machine-learning"; // ES Modules import
// const { MachineLearningClient, UpdateDataSourceCommand } = require("@aws-sdk/client-machine-learning"); // CommonJS import
const client = new MachineLearningClient(config);
const input = { // UpdateDataSourceInput
  DataSourceId: "STRING_VALUE", // required
  DataSourceName: "STRING_VALUE", // required
};
const command = new UpdateDataSourceCommand(input);
const response = await client.send(command);
// { // UpdateDataSourceOutput
//   DataSourceId: "STRING_VALUE",
// };

UpdateDataSourceCommand Input

See UpdateDataSourceCommandInput for more details

Parameter
Type
Description
DataSourceId
Required
string | undefined

The ID assigned to the DataSource during creation.

DataSourceName
Required
string | undefined

A new user-supplied name or description of the DataSource that will replace the current description.

UpdateDataSourceCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
DataSourceId
string | undefined

The ID assigned to the DataSource during creation. This value should be identical to the value of the DataSourceID in the request.

Throws

Name
Fault
Details
InternalServerException
server

An error on the server occurred when trying to process a request.

InvalidInputException
client

An error on the client occurred. Typically, the cause is an invalid input value.

ResourceNotFoundException
client

A specified resource cannot be located.

MachineLearningServiceException
Base exception class for all service exceptions from MachineLearning service.