- 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.
StopDiscoveryJobCommand
Stops a running DataSync discovery job.
You can stop a discovery job anytime. A job that's stopped before it's scheduled to end likely will provide you some information about your on-premises storage system resources. To get recommendations for a stopped job, you must use the GenerateRecommendations operation.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, StopDiscoveryJobCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, StopDiscoveryJobCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // StopDiscoveryJobRequest
DiscoveryJobArn: "STRING_VALUE", // required
};
const command = new StopDiscoveryJobCommand(input);
const response = await client.send(command);
// {};
StopDiscoveryJobCommand Input
See StopDiscoveryJobCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DiscoveryJobArn Required | string | undefined | Specifies the Amazon Resource Name (ARN) of the discovery job that you want to stop. |
StopDiscoveryJobCommand Output
See StopDiscoveryJobCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalException | server | This exception is thrown when an error occurs in the DataSync service. |
InvalidRequestException | client | This exception is thrown when the client submits a malformed request. |
DataSyncServiceException | Base exception class for all service exceptions from DataSync service. |