Jump to Content

Class CreateAgentCommandProtected

Activates an DataSync agent that you have deployed in your storage environment. The activation process associates your agent with your account. In the activation process, you specify information such as the Amazon Web Services Region that you want to activate the agent in. You activate the agent in the Amazon Web Services Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this Amazon Web Services Region.

You can activate the agent in a VPC (virtual private cloud) or provide the agent access to a VPC endpoint so you can run tasks without going over the public internet.

You can use an agent for more than one location. If a task uses multiple agents, all of them need to have status AVAILABLE for the task to run. If you use multiple agents for a source location, the status of all the agents must be AVAILABLE for the task to run.

Agents are automatically updated by Amazon Web Services on a regular basis, using a mechanism that ensures minimal interruption to your tasks.

Example

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

import { DataSyncClient, CreateAgentCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, CreateAgentCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = {
ActivationKey: "STRING_VALUE", // required
AgentName: "STRING_VALUE",
Tags: [
{
Key: "STRING_VALUE", // required
Value: "STRING_VALUE",
},
],
VpcEndpointId: "STRING_VALUE",
SubnetArns: [
"STRING_VALUE",
],
SecurityGroupArns: [
"STRING_VALUE",
],
};
const command = new CreateAgentCommand(input);
const response = await client.send(command);

Param

CreateAgentCommandInput

Returns

CreateAgentCommandOutput

See

Throws

InternalException (server fault)

This exception is thrown when an error occurs in the DataSync service.

Throws

InvalidRequestException (client fault)

This exception is thrown when the client submits a malformed request.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<CreateAgentCommandInput, CreateAgentCommandOutput>

Methods