- 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.
DeleteAgentCommand
Removes an DataSync agent resource from your Amazon Web Services account.
Keep in mind that this operation (which can't be undone) doesn't remove the agent's virtual machine (VM) or Amazon EC2 instance from your storage environment. For next steps, you can delete the VM or instance from your storage environment or reuse it to activate a new agent .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, DeleteAgentCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, DeleteAgentCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // DeleteAgentRequest
AgentArn: "STRING_VALUE", // required
};
const command = new DeleteAgentCommand(input);
const response = await client.send(command);
// {};
DeleteAgentCommand Input
See DeleteAgentCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AgentArn Required | string | undefined | The Amazon Resource Name (ARN) of the agent to delete. Use the |
DeleteAgentCommand Output
See DeleteAgentCommandOutput 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. |