

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Ec2Config
<a name="API_Ec2Config"></a>

 AWS DataSync 用來連線至其中一個 Amazon EFS 檔案系統[掛載目標](https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html)的子網路和安全群組。

## 目錄
<a name="API_Ec2Config_Contents"></a>

 ** SecurityGroupArns **   <a name="DataSync-Type-Ec2Config-SecurityGroupArns"></a>
指定與 Amazon EFS 檔案系統的掛載目標相關聯的安全群組的 Amazon Resource Name (ARN)。  
類型：字串陣列  
陣列成員：項目數下限為 1。項目數上限為 5。  
長度限制：長度上限為 128。  
模式：`^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):ec2:[a-z\-0-9]*:[0-9]{12}:security-group/sg-[a-f0-9]+$`  
必要：是

 ** SubnetArn **   <a name="DataSync-Type-Ec2Config-SubnetArn"></a>
指定子網路的 ARN，DataSync 在該子網路建立[網路介面](https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces)以便在傳輸期間管理流量。  
子網路必須位於：  
+ 與 Amazon EFS 檔案系統相同的 Virtual Private Cloud (VPC) 中。
+ 與 Amazon EFS 檔案系統的至少一個掛載目標相同的可用區域中。
您不需要指定包含檔案系統掛載目標的子網路。
類型：字串  
長度限制：長度上限為 128。  
模式：`^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):ec2:[a-z\-0-9]*:[0-9]{12}:subnet/subnet-[a-f0-9]+$`  
必要：是

## 另請參閱
<a name="API_Ec2Config_SeeAlso"></a>

如需在其中一種語言特定 AWS SDKs中使用此 API 的詳細資訊，請參閱下列內容：
+  [AWS 適用於 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/datasync-2018-11-09/Ec2Config) 
+  [AWS 適用於 Java V2 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaV2/datasync-2018-11-09/Ec2Config) 
+  [AWS 適用於 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/datasync-2018-11-09/Ec2Config) 