

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

# 組織控管的 IAM 條件索引鍵
<a name="transfer-condition-keys"></a>

AWS Transfer Family 提供 IAM 條件金鑰，可讓您限制任何 IAM 政策中的資源組態。這些條件金鑰可用於連接到使用者或角色的身分型政策，或用於組織控管的服務控制政策 SCPs)。

服務控制政策是適用於整個 AWS 組織的 IAM 政策，可在多個帳戶中提供預防性護欄。在 SCPs 中使用時，這些條件金鑰有助於在整個組織中強制執行安全和合規要求。

**另請參閱**
+ [Transfer 系列的動作、資源和條件索引鍵](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awstransferfamily.html)
+ [服務控制政策 (SCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html)
+ 說明如何使用服務控制政策強制執行預防性護欄的影片  
[![AWS Videos](http://img.youtube.com/vi/mEO05mmbSms/0.jpg)](http://www.youtube.com/watch?v=mEO05mmbSms)

## 可用的條件索引鍵
<a name="scp-condition-keys"></a>

AWS Transfer Family 支援下列條件索引鍵，可用於 IAM 政策：

`transfer:RequestServerEndpointType`  
根據端點類型 (PUBLIC、VPC、VPC\_ENDPOINT) 限制伺服器建立和更新。通常用於防止公開端點。

`transfer:RequestServerProtocols`  
根據支援的通訊協定 (SFTP、FTP、FTP、AS2) 限制伺服器建立和更新。

`transfer:RequestServerDomain`  
根據網域類型 (S3、EFS限制伺服器建立。

`transfer:RequestConnectorProtocol`  
根據通訊協定 (AS2、SFTP) 限制連接器的建立。

## 支援的動作
<a name="scp-supported-actions"></a>

條件索引鍵可套用至下列 AWS Transfer Family 動作：
+ `CreateServer`：支援 `RequestServerEndpointType`、 `RequestServerProtocols`和 `RequestServerDomain`條件索引鍵
+ `UpdateServer`：支援`RequestServerEndpointType`和`RequestServerProtocols`條件索引鍵
+ `CreateConnector`：支援`RequestConnectorProtocol`條件金鑰

## 範例 SCP 政策
<a name="scp-example-policy"></a>

下列範例 SCP 可防止整個組織的公有 AWS Transfer Family 伺服器建立：

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [{
        "Sid": "DenyPublicTransferServers",
        "Effect": "Deny",
        "Action": ["transfer:CreateServer", "transfer:UpdateServer"],
        "Resource": "*",
        "Condition": {
            "StringEquals": {
                "transfer:RequestServerEndpointType": "PUBLIC"
            }
        }
    }]
}
```