UpdateDiscoveryJobCommand

Edits a DataSync discovery job configuration.

Example Syntax

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

import { DataSyncClient, UpdateDiscoveryJobCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, UpdateDiscoveryJobCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // UpdateDiscoveryJobRequest
  DiscoveryJobArn: "STRING_VALUE", // required
  CollectionDurationMinutes: Number("int"), // required
};
const command = new UpdateDiscoveryJobCommand(input);
const response = await client.send(command);
// {};

UpdateDiscoveryJobCommand Input

See UpdateDiscoveryJobCommandInput for more details

Parameter
Type
Description
CollectionDurationMinutes
Required
number | undefined

Specifies in minutes how long that you want the discovery job to run. (You can't set this parameter to less than the number of minutes that the job has already run for.)

DiscoveryJobArn
Required
string | undefined

Specifies the Amazon Resource Name (ARN) of the discovery job that you want to update.

UpdateDiscoveryJobCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

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.