- 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.
DescribeAgentCommand
Returns information about an DataSync agent, such as its name, service endpoint type, and status.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, DescribeAgentCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, DescribeAgentCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // DescribeAgentRequest
AgentArn: "STRING_VALUE", // required
};
const command = new DescribeAgentCommand(input);
const response = await client.send(command);
// { // DescribeAgentResponse
// AgentArn: "STRING_VALUE",
// Name: "STRING_VALUE",
// Status: "ONLINE" || "OFFLINE",
// LastConnectionTime: new Date("TIMESTAMP"),
// CreationTime: new Date("TIMESTAMP"),
// EndpointType: "PUBLIC" || "PRIVATE_LINK" || "FIPS",
// PrivateLinkConfig: { // PrivateLinkConfig
// VpcEndpointId: "STRING_VALUE",
// PrivateLinkEndpoint: "STRING_VALUE",
// SubnetArns: [ // PLSubnetArnList
// "STRING_VALUE",
// ],
// SecurityGroupArns: [ // PLSecurityGroupArnList
// "STRING_VALUE",
// ],
// },
// Platform: { // Platform
// Version: "STRING_VALUE",
// },
// };
DescribeAgentCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AgentArn Required | string | undefined | Specifies the Amazon Resource Name (ARN) of the DataSync agent that you want information about. |
DescribeAgentCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
AgentArn | string | undefined | The ARN of the agent. |
CreationTime | Date | undefined | The time that the agent was activated . |
EndpointType | EndpointType | undefined | The type of service endpoint that your agent is connected to. |
LastConnectionTime | Date | undefined | The last time that the agent was communicating with the DataSync service. |
Name | string | undefined | The name of the agent. |
Platform | Platform | undefined | The platform-related details about the agent, such as the version number. |
PrivateLinkConfig | PrivateLinkConfig | undefined | The network configuration that the agent uses when connecting to a VPC service endpoint . |
Status | AgentStatus | undefined | The status of the agent.
|
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. |