StartDiscoveryJobCommand

Runs a DataSync discovery job on your on-premises storage system. If you haven't added the storage system to DataSync Discovery yet, do this first by using the AddStorageSystem  operation.

Example Syntax

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

import { DataSyncClient, StartDiscoveryJobCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, StartDiscoveryJobCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // StartDiscoveryJobRequest
  StorageSystemArn: "STRING_VALUE", // required
  CollectionDurationMinutes: Number("int"), // required
  ClientToken: "STRING_VALUE", // required
  Tags: [ // InputTagList
    { // TagListEntry
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE",
    },
  ],
};
const command = new StartDiscoveryJobCommand(input);
const response = await client.send(command);
// { // StartDiscoveryJobResponse
//   DiscoveryJobArn: "STRING_VALUE",
// };

StartDiscoveryJobCommand Input

See StartDiscoveryJobCommandInput for more details

Parameter
Type
Description
CollectionDurationMinutes
Required
number | undefined

Specifies in minutes how long you want the discovery job to run.

For more accurate recommendations, we recommend a duration of at least 14 days. Longer durations allow time to collect a sufficient number of data points and provide a realistic representation of storage performance and utilization.

StorageSystemArn
Required
string | undefined

Specifies the Amazon Resource Name (ARN) of the on-premises storage system that you want to run the discovery job on.

ClientToken
string | undefined

Specifies a client token to make sure requests with this API operation are idempotent. If you don't specify a client token, DataSync generates one for you automatically.

Tags
TagListEntry[] | undefined

Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources.

StartDiscoveryJobCommand Output

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

The ARN of the discovery job that you started.

Throws

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.