Skip to main content

agents

Creates, updates, deletes, gets or lists an agents resource.

Overview

Nameagents
TypeResource
Idaws.datasync.agents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_arnstringThe ARN of the agent. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):datasync:[a-z-0-9]+:[0-9]{12}:agent/agent-[0-9a-z]{17}$</code>)
creation_timestring (date-time)The time that the agent was activated.
endpoint_typestringThe type of service endpoint that your agent is connected to. (PUBLIC, PRIVATE_LINK, FIPS, FIPS_PRIVATE_LINK)
last_connection_timestring (date-time)The last time that the agent was communicating with the DataSync service.
namestringThe name of the agent. (pattern: <code>^[a-zA-Z0-9\s+=._:@/-]+$</code>)
platformobjectThe platform-related details about the agent, such as the version number.
private_link_configobjectThe network configuration that the agent uses when connecting to a VPC service endpoint.
statusstringThe status of the agent. If the status is ONLINE, the agent is configured properly and ready to use. If the status is OFFLINE, the agent has been out of contact with DataSync for five minutes or longer. This can happen for a few reasons. For more information, see What do I do if my agent is offline? (ONLINE, OFFLINE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_agentselectregionReturns information about an DataSync agent, such as its name, service endpoint type, and status.
list_agentsselectregionReturns a list of DataSync agents that belong to an Amazon Web Services account in the Amazon Web Services Region specified in the request. With pagination, you can reduce the number of agents returned in a response. If you get a truncated list of agents in a response, the response contains a marker that you can specify in your next request to fetch the next page of agents. ListAgents is eventually consistent. This means the result of running the operation might not reflect that you just created or deleted an agent. For example, if you create an agent with CreateAgent and then immediately run ListAgents, that agent might not show up in the list right away. In situations like this, you can always confirm whether an agent has been created (or deleted) by using DescribeAgent.
create_agentinsertregion, ActivationKeyActivates an DataSync agent that you deploy in your storage environment. The activation process associates the agent with your Amazon Web Services account. If you haven't deployed an agent yet, see Do I need a DataSync agent?
update_agentupdateregion, AgentArnUpdates the name of an DataSync agent.
delete_agentdeleteregionRemoves 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about an DataSync agent, such as its name, service endpoint type, and status.

SELECT
agent_arn,
creation_time,
endpoint_type,
last_connection_time,
name,
platform,
private_link_config,
status
FROM aws.datasync.agents
WHERE region = '{{ region }}' -- required
;

INSERT examples

Activates an DataSync agent that you deploy in your storage environment. The activation process associates the agent with your Amazon Web Services account. If you haven't deployed an agent yet, see Do I need a DataSync agent?

INSERT INTO aws.datasync.agents (
ActivationKey,
AgentName,
Tags,
VpcEndpointId,
SubnetArns,
SecurityGroupArns,
region
)
SELECT
'{{ ActivationKey }}' /* required */,
'{{ AgentName }}',
'{{ Tags }}',
'{{ VpcEndpointId }}',
'{{ SubnetArns }}',
'{{ SecurityGroupArns }}',
'{{ region }}'
RETURNING
agent_arn
;

UPDATE examples

Updates the name of an DataSync agent.

UPDATE aws.datasync.agents
SET
AgentArn = '{{ AgentArn }}',
Name = '{{ Name }}'
WHERE
region = '{{ region }}' --required
AND AgentArn = '{{ AgentArn }}' --required;

DELETE examples

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.

DELETE FROM aws.datasync.agents
WHERE region = '{{ region }}' --required
;