View a markdown version of this page

Amazon Cognito Sync 的動作、資源與條件索引鍵 - 服務授權參考

Amazon Cognito Sync 的動作、資源與條件索引鍵

Amazon Cognito Sync (服務字首:cognito-sync) 提供下列服務特定的操作、資源、動作和條件索引鍵,可用於 IAM 許可政策。

參考資料:

Amazon Cognito Sync 定義的 API 操作

下表將 API 操作映射至其授權的 IAM 動作。只會列出具有指定 API 和動作靜態值的條件金鑰;如需每個動作支援的完整條件金鑰集,請參閱動作表格。

作業 IAM 動作 條件鍵 可能的值 (s) 存取層級

BulkPublish

cognito-sync:BulkPublish

寫入

DeleteDataset

cognito-sync:DeleteDataset

寫入

DescribeDataset

cognito-sync:DescribeDataset

讀取

DescribeIdentityPoolUsage

cognito-sync:DescribeIdentityPoolUsage

讀取

DescribeIdentityUsage

cognito-sync:DescribeIdentityUsage

讀取

GetBulkPublishDetails

cognito-sync:GetBulkPublishDetails

讀取

GetCognitoEvents

cognito-sync:GetCognitoEvents

讀取

GetIdentityPoolConfiguration

cognito-sync:GetIdentityPoolConfiguration

讀取

ListDatasets

cognito-sync:ListDatasets

清單

ListIdentityPoolUsage

cognito-sync:ListIdentityPoolUsage

讀取

ListRecords

cognito-sync:ListRecords

讀取

RegisterDevice

cognito-sync:RegisterDevice

寫入

SetCognitoEvents

cognito-sync:SetCognitoEvents

寫入

SetIdentityPoolConfiguration

cognito-sync:SetIdentityPoolConfiguration

寫入

iam:PassRole

寫入

SubscribeToDataset

cognito-sync:SubscribeToDataset

寫入

UnsubscribeFromDataset

cognito-sync:UnsubscribeFromDataset

寫入

UpdateRecords

cognito-sync:UpdateRecords

寫入

Amazon Cognito Sync 定義的動作

您可在 IAM 政策陳述式的 Action 元素中指定以下動作。使用政策來授予在 AWS中執行操作的許可。在政策中使用動作時,通常會允許或拒絕存取相同名稱的 API 操作或 CLI 命令。不過,在某些情況下,單一動作可控制對多個操作的存取。或者,某些操作需要多種不同的動作。

動作 說明 資源類型 (*必填項目) 條件索引鍵 存取層級

BulkPublish

准許啟動將身分集區所有現有資料集大量發佈到所設定串流的動作

identitypool*

寫入

DeleteDataset

准許刪除特定資料集

資料集*

寫入

DescribeDataset

准許依身分和資料集名稱取得與資料集相關的中繼資料

資料集*

讀取

DescribeIdentityPoolUsage

准許取得關於特定身分集區的用量詳細資訊 (如資料儲存體)

identitypool*

讀取

DescribeIdentityUsage

准許取得身分用量資訊,包含資料集數量和資料用量

identity*

讀取

GetBulkPublishDetails

准許取得上次針對身分集區執行 BulkPublish 操作的狀態

identitypool*

讀取

GetCognitoEvents

准許取得與身分集區相關聯的事件和對應 Lambda 函數

identitypool*

讀取

GetIdentityPoolConfiguration

准許取得身分集區的配置設定

identitypool*

讀取

ListDatasets

准許列出身分資料集

資料集*

清單

ListIdentityPoolUsage

准許取得已向 Cognito 註冊的身分集區清單

identitypool*

讀取

ListRecords

准許取得分頁記錄,選擇在資料集和身分特定同步計數後進行變更。

資料集*

讀取

RegisterDevice

准許註冊裝置以接收推播同步通知。

identity*

寫入

SetCognitoEvents

准許為身分集區的指定事件類型設定 AWS Lambda 函數

identitypool*

寫入

SetIdentityPoolConfiguration

准許設定推播同步的必要組態

identitypool*

寫入

SubscribeToDataset

准許訂閱,即可在資料集由另一個裝置修改時收到通知

資料集*

寫入

UnsubscribeFromDataset

准許取消訂閱,在資料集由另一個裝置修改時將不會收到通知

資料集*

寫入

UpdateRecords

准許張貼更新以記錄和新增及刪除資料集和使用者的記錄

資料集*

寫入

Amazon Cognito Sync 的僅限許可動作

下列動作是由 Amazon Cognito Sync 定義,但無法透過任何 API 操作直接叫用。它們只能在 IAM 政策陳述式中使用,以授予或拒絕許可。

動作 說明 資源類型 (*必填項目) 條件索引鍵 存取層級

QueryRecords

准許查詢記錄

讀取

SetDatasetConfiguration

准許配置資料集

資料集*

寫入

Amazon Cognito Sync 定義的資源類型

此服務會定義下列資源類型,並可用在 IAM 許可政策陳述式的 Resource 元素中。

資源類型 ARN 條件索引鍵

資料集

arn:${Partition}:cognito-sync:${Region}:${Account}:identitypool/${IdentityPoolId}/identity/${IdentityId}/dataset/${DatasetName}

身分

arn:${Partition}:cognito-sync:${Region}:${Account}:identitypool/${IdentityPoolId}/identity/${IdentityId}

identitypool

arn:${Partition}:cognito-sync:${Region}:${Account}:identitypool/${IdentityPoolId}

Amazon Cognito Sync 條件索引鍵

Amazon Cognito Sync 沒有可在政策陳述式 Condition元素中使用的服務特定條件金鑰。