Skip to main content

agents

Creates, updates, deletes or gets an agent resource or lists agents in a region

Overview

Nameagents
TypeResource
DescriptionResource schema for AWS::DataSync::Agent.
Idaws.datasync.agents

Fields

NameDatatypeDescription
agent_namestringThe name configured for the agent. Text reference used to identify the agent in the console.
activation_keystringActivation key of the Agent.
security_group_arnsarrayThe ARNs of the security group used to protect your data transfer task subnets.
subnet_arnsarrayThe ARNs of the subnets in which DataSync will create elastic network interfaces for each data transfer task.
vpc_endpoint_idstringThe ID of the VPC endpoint that the agent has access to.
endpoint_typestringThe service endpoints that the agent will connect to.
tagsarrayAn array of key-value pairs to apply to this resource.
agent_arnstringThe DataSync Agent ARN.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERT, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all agents in a region.

SELECT
region,
agent_name,
activation_key,
security_group_arns,
subnet_arns,
vpc_endpoint_id,
endpoint_type,
tags,
agent_arn
FROM aws.datasync.agents
WHERE region = 'us-east-1';

Gets all properties from an individual agent.

SELECT
region,
agent_name,
activation_key,
security_group_arns,
subnet_arns,
vpc_endpoint_id,
endpoint_type,
tags,
agent_arn
FROM aws.datasync.agents
WHERE region = 'us-east-1' AND data__Identifier = '<AgentArn>';

INSERT example

Use the following StackQL query and manifest file to create a new agent resource, using stack-deploy.

/*+ create */
INSERT INTO aws.datasync.agents (
,
region
)
SELECT
'{{ }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.datasync.agents
WHERE data__Identifier = '<AgentArn>'
AND region = 'us-east-1';

Permissions

To operate on the agents resource, the following permissions are required:

Create

datasync:CreateAgent,
datasync:TagResource,
datasync:DescribeAgent,
datasync:ListTagsForResource,
ec2:DescribeNetworkInterfaces,
ec2:DescribeSecurityGroups,
ec2:DescribeSubnets,
ec2:DescribeVpcEndpoints

Read

datasync:DescribeAgent,
datasync:ListTagsForResource

Update

datasync:UpdateAgent,
datasync:DescribeAgent,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource

Delete

datasync:DeleteAgent

List

datasync:ListAgents