

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

# Amazon Bedrock 專案的 IAM 政策
<a name="security-iam-projects"></a>

您可以使用 IAM 政策來控制對 Amazon Bedrock Projects 資源的存取。這些是您連接到 IAM 使用者、群組或角色的標準 IAM 身分型政策。這些政策使用 `Resource`元素來限制特定專案 ARNs許可範圍。如需建立和管理 IAM 政策的一般資訊，請參閱《[IAM 使用者指南》中的管理 IAM 政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage.html)。 **

## 專案的 IAM 政策範例
<a name="security-iam-projects-examples"></a>

下列範例顯示授予 Bedrock Projects 資源存取權的 IAM 政策文件。使用 IAM 主控台、CLI 或 API 將這些政策連接到 IAM 使用者、群組或角色。

### 拒絕建立專案
<a name="security-iam-projects-deny-create"></a>

下列政策可防止使用者建立新的專案：

```
{
    "Version": "2012-10-17", 		 	 	 
    "Statement": [
        {
            "Sid": "DenyProjectCreation",
            "Effect": "Deny",
            "Action": "bedrock-mantle:CreateProject",
            "Resource": "*"
        }
    ]
}
```

### 專案的唯讀存取
<a name="security-iam-projects-readonly"></a>

下列政策授予特定專案的唯讀存取權：

```
{
    "Version": "2012-10-17", 		 	 	 
    "Statement": [
        {
            "Sid": "ReadOnlyProjectAccess",
            "Effect": "Allow",
            "Action": [
                "bedrock-mantle:GetProject",
                "bedrock-mantle:ListProjects",
                "bedrock-mantle:ListTagsForResources",
                "bedrock-mantle:CreateInference"
            ],
            "Resource": "arn:aws:bedrock-mantle:us-east-1:123456789012:project/proj_abc123"
        }
    ]
}
```

### 專案的完整存取權
<a name="security-iam-projects-full-access"></a>

下列政策授予特定專案上所有 Bedrock 專案動作的完整存取權：

```
{
    "Version": "2012-10-17", 		 	 	 
    "Statement": [
        {
            "Sid": "FullProjectAccess",
            "Effect": "Allow",
            "Action": "bedrock-mantle:*",
            "Resource": "arn:aws:bedrock-mantle:us-east-1:123456789012:project/proj_abc123"
        }
    ]
}
```