@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.860Z") @Stability(value=Stable) public class CfnAgent extends CfnResource implements IInspectable
The AWS::DataSync::Agent resource specifies an AWS DataSync agent to be deployed and activated on your host. The activation process associates your agent with your account. In the activation process, you specify information such as the AWS Region that you want to activate the agent in. You activate the agent in the AWS Region where your target locations (in Amazon S3, Amazon EFS, or Amazon FSx for Windows File Server) reside. Your tasks are created in this AWS Region .
You can activate the agent in a virtual private cloud (VPC) or provide the agent access to a VPC endpoint so that you can run tasks without sending them over the public internet.
You can specify an agent to be used for more than one location. If a task uses multiple agents, all of them must have a status of 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.
For more information, see Activating an Agent in the AWS DataSync User Guide .
Agents are automatically updated by AWS on a regular basis, using a mechanism that ensures minimal interruption to your tasks.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.datasync.*;
CfnAgent cfnAgent = CfnAgent.Builder.create(this, "MyCfnAgent")
.activationKey("activationKey")
// the properties below are optional
.agentName("agentName")
.securityGroupArns(List.of("securityGroupArns"))
.subnetArns(List.of("subnetArns"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcEndpointId("vpcEndpointId")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnAgent.Builder
A fluent builder for
CfnAgent. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnAgent(software.constructs.Construct scope,
String id,
CfnAgentProps props)
Create a new `AWS::DataSync::Agent`.
|
protected |
CfnAgent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAgent(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getActivationKey()
Your agent activation key.
|
String |
getAgentName()
The name you configured for your agent.
|
String |
getAttrAgentArn()
The Amazon Resource Name (ARN) of the agent.
|
String |
getAttrEndpointType()
The type of endpoint that your agent is connected to.
|
protected Map<String,Object> |
getCfnProperties() |
List<String> |
getSecurityGroupArns()
The Amazon Resource Names (ARNs) of the security groups used to protect your data transfer task subnets.
|
List<String> |
getSubnetArns()
The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task.
|
TagManager |
getTags()
The key-value pair that represents the tag that you want to associate with the agent.
|
String |
getVpcEndpointId()
The ID of the virtual private cloud (VPC) endpoint that the agent has access to.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setActivationKey(String value)
Your agent activation key.
|
void |
setAgentName(String value)
The name you configured for your agent.
|
void |
setSecurityGroupArns(List<String> value)
The Amazon Resource Names (ARNs) of the security groups used to protect your data transfer task subnets.
|
void |
setSubnetArns(List<String> value)
The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task.
|
void |
setVpcEndpointId(String value)
The ID of the virtual private cloud (VPC) endpoint that the agent has access to.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnAgent(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAgent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnAgent(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnAgentProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrAgentArn()
Use the ListAgents operation to return a list of agents for your account and AWS Region .
@Stability(value=Stable) @NotNull public String getAttrEndpointType()
If the endpoint is a VPC endpoint, the agent is not accessible over the public internet.
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
The value can be an empty string. This value helps you manage, filter, and search for your agents.
Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @.
@Stability(value=Stable) @NotNull public String getActivationKey()
You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console.
The redirect URL returned in the response provides you the activation key for your agent in the query string parameter activationKey . It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.
For more information, see Creating and activating an agent in the AWS DataSync User Guide.
@Stability(value=Stable)
public void setActivationKey(@NotNull
String value)
You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console.
The redirect URL returned in the response provides you the activation key for your agent in the query string parameter activationKey . It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.
For more information, see Creating and activating an agent in the AWS DataSync User Guide.
@Stability(value=Stable) @Nullable public String getAgentName()
This value is a text reference that is used to identify the agent in the console.
@Stability(value=Stable)
public void setAgentName(@Nullable
String value)
This value is a text reference that is used to identify the agent in the console.
@Stability(value=Stable) @Nullable public List<String> getSecurityGroupArns()
See SecurityGroupArns .
Pattern : ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\-0-9]*:[0-9]{12}:security-group/.*$
@Stability(value=Stable)
public void setSecurityGroupArns(@Nullable
List<String> value)
See SecurityGroupArns .
Pattern : ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):ec2:[a-z\-0-9]*:[0-9]{12}:security-group/.*$
@Stability(value=Stable) @Nullable public List<String> getSubnetArns()
The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.
@Stability(value=Stable)
public void setSubnetArns(@Nullable
List<String> value)
The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.
@Stability(value=Stable) @Nullable public String getVpcEndpointId()
This is the client-side VPC endpoint, powered by AWS PrivateLink . If you don't have an AWS PrivateLink VPC endpoint, see AWS PrivateLink and VPC endpoints in the Amazon VPC User Guide .
For more information about activating your agent in a private network based on a VPC, see Using AWS DataSync in a Virtual Private Cloud in the AWS DataSync User Guide.
A VPC endpoint ID looks like this: vpce-01234d5aff67890e1 .
@Stability(value=Stable)
public void setVpcEndpointId(@Nullable
String value)
This is the client-side VPC endpoint, powered by AWS PrivateLink . If you don't have an AWS PrivateLink VPC endpoint, see AWS PrivateLink and VPC endpoints in the Amazon VPC User Guide .
For more information about activating your agent in a private network based on a VPC, see Using AWS DataSync in a Virtual Private Cloud in the AWS DataSync User Guide.
A VPC endpoint ID looks like this: vpce-01234d5aff67890e1 .
Copyright © 2022. All rights reserved.