- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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 |
---|
Parameter | Type | Description |
---|---|---|
DataSourceId Required | string | undefined | The ID assigned to the |
DataSourceName Required | string | undefined | A new user-supplied name or description of the |
UpdateDataSourceCommand Output
See UpdateDataSourceCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DataSourceId | string | undefined | The ID assigned to the |
Throws
Name | Fault | Details |
---|
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. |