DataSync / Client / create_agent
create_agent#
- DataSync.Client.create_agent(**kwargs)#
Activates an DataSync agent that you’ve deployed 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 the following topics to learn more:
Note
If you’re transferring between Amazon Web Services storage services, you don’t need a DataSync agent.
See also: AWS API Documentation
Request Syntax
response = client.create_agent( ActivationKey='string', AgentName='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], VpcEndpointId='string', SubnetArns=[ 'string', ], SecurityGroupArns=[ 'string', ] )
- Parameters:
ActivationKey (string) –
[REQUIRED]
Specifies your DataSync agent’s activation key. If you don’t have an activation key, see Activate your agent.
AgentName (string) – Specifies a name for your agent. You can see this name in the DataSync console.
Tags (list) –
Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least one tag for your agent.
(dict) –
A key-value pair representing a single tag that’s been applied to an Amazon Web Services resource.
Key (string) – [REQUIRED]
The key for an Amazon Web Services resource tag.
Value (string) –
The value for an Amazon Web Services resource tag.
VpcEndpointId (string) –
Specifies the ID of the VPC endpoint that you want your agent to connect to. For example, a VPC endpoint ID looks like
vpce-01234d5aff67890e1
.Warning
The VPC endpoint you use must include the DataSync service name (for example,
com.amazonaws.us-east-2.datasync
).SubnetArns (list) –
Specifies the ARN of the subnet where you want to run your DataSync task when using a VPC endpoint. This is the subnet where DataSync creates and manages the network interfaces for your transfer. You can only specify one ARN.
(string) –
SecurityGroupArns (list) –
Specifies the Amazon Resource Name (ARN) of the security group that protects your task’s network interfaces when using a virtual private cloud (VPC) endpoint. You can only specify one ARN.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'AgentArn': 'string' }
Response Structure
(dict) –
CreateAgentResponse
AgentArn (string) –
The ARN of the agent that you just activated. Use the ListAgents operation to return a list of agents in your Amazon Web Services account and Amazon Web Services Region.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException