

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

# 設定具有 IAM 許可的使用者
<a name="device-iam-for-user"></a>

本節說明 IAM 管理員必須指派給使用者和其他 AWS 身分的許可，以便他們可以設定連結裝置來使用 MediaLive 輸入或 MediaConnect 流程。

此資訊補充了有關設定使用者使用所有 MediaLive 功能的資訊。請閱讀此資訊，如下所示：
+ 如果您的組織有只能使用 MediaLive 來部署裝置並設定為用作來源的使用者，而且您想要遵循*最低許可*規則，請閱讀本節。
+ 如果您的組織有將部署裝置的使用者，請使用這些裝置，並使用所有 MediaLive 功能，請參閱 [的需求 AWS Elemental Link](requirements-for-link.md)。您應該修改其現有政策，以包含裝置許可。

本節假設您已執行下列任務：
+ 您已執行中所述的初始設定，[設定 以使用 MediaLive 的初步步驟](setting-up.md)以註冊 MediaLive 並建立管理員。
+ 您已閱讀 中[AWS Elemental MediaLive 的 Identity and Access Management](security-iam.md)有關如何建立管理員、使用者和其他 AWS 身分的建議。

**Topics**
+ [所需的許可](#device-iam-permissions)
+ [建立政策](#device-iam-policy)

## 所需的許可
<a name="device-iam-permissions"></a>

您必須為數個 服務中的動作指派許可，如下表所述。


| 許可 | IAM 中的服務名稱 | 動作 | 
| --- | --- | --- | 
| 檢視、設定和管理連結裝置  | medialive |  `DescribeInputDevice` `DescribeInputDeviceThumbnail` `ListInputDevices` `RebootInputDevice` `StartInputDeviceMaintenanceWindow` `StartInputDevice` `StopInputDevice` `UpdateInputDevice`  | 
| 處理連結裝置的傳輸 | medialive |  `AcceptInputDeviceTransfer` `CancelInputDeviceTransfer` `ClaimDevice` `ListInputDeviceTransfers` `RejectInputDeviceTransfer` `TransferInputDevice`  | 
|  在 MediaLive 主控台上，檢視下拉式清單中的 MediaConnect 流程。此下拉式清單會出現在**裝置詳細資訊**頁面上**附件**索引標籤的流程 **ARN** 欄位中。  | mediaconnect | ListFlows | 
|  在 MediaLive 主控台上，檢視下拉式清單中的 Secrets Manager 秘密。此下拉式清單會出現在**裝置詳細資訊**頁面上**附件**索引標籤的**機密 ARN** 欄位中。  | secretsmanager | ListSecrets | 
|  在 MediaLive 主控台上，檢視下拉式清單中的 IAM 角色。此下拉式清單會出現在**裝置詳細資訊**頁面上**附件**索引標籤**的角色 ARN** 欄位中。  | iam | ListRoles | 

## 建立政策
<a name="device-iam-policy"></a>

1. 登入 AWS 管理主控台 ，並在 https：//[https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/) 開啟 IAM 主控台。

1. 在左側的導覽窗格中，選擇 **Policies (政策)**。選擇 **Create Policy** (建立政策)，然後選擇 **JSON** 標籤。

1. 在**政策編輯器**中，清除範例內容並貼上此程序之後出現的政策。

1. 為政策命名，以明確表示此政策適用於使用 Link。例如 `ElementalLinkAccess`。

1. 選擇**建立政策**。

範例政策：

------
#### [ JSON ]

****  

```
 {
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "medialive:DescribeInputDevice",
        "medialive:DescribeInputDeviceThumbnail",
        "medialive:ListInputDevices",
        "medialive:RebootInputDevice",
        "medialive:StartInputDeviceMaintenanceWindow",
        "medialive:StartInputDevice",
        "medialive:StopInputDevice",
        "medialive:UpdateInputDevice"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "medialive:AcceptInputDeviceTransfer",
        "medialive:CancelInputDeviceTransfer",
        "medialive:ClaimDevice",
        "medialive:ListInputDeviceTransfers",
        "medialive:RejectInputDeviceTransfer",
        "medialive:TransferInputDevice"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "mediaconnect:ListFlows"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "secretsmanager:ListSecrets"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "iam:ListRoles"
      ],
      "Resource": [
        "*"
      ]
    }
  ]
}
```

------