AWS IoT Greengrass 的動作、資源和條件索引鍵 - 服務授權參考

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

AWS IoT Greengrass 的動作、資源和條件索引鍵

AWS IoT Greengrass (服務前置詞:greengrass) 提供下列服務特定資源、動作和條件內容金鑰,供 IAM 權限政策使用。

參考資料:

AWS IoT Greengrass 定義的動作

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

「動作」資料表的資源類型欄會指出每個動作是否支援資源層級的許可。如果此欄沒有值,您必須在政策陳述式的 Resource 元素中指定政策適用的所有資源 ("*")。如果資料欄包含資源類型,則您可以在具有該動作的陳述式中指定該類型的 ARN。如果動作具有一或多個必要資源,呼叫者必須具有對這些資源使用動作的許可。表格中的必要資源會以星號 (*) 表示。如果您使用 IAM 政策中的 Resource 元素限制資源存取,則每種必要的資源類型必須要有 ARN 或模式。某些動作支援多種資源類型。如果資源類型是選用 (未顯示為必要),則您可以選擇使用其中一種選用資源類型。

「動作」資料表的條件索引鍵欄包含您可以在政策陳述式的 Condition 元素中指定的索引鍵。如需有關與服務資源相關聯之條件索引鍵的詳細資訊,請參閱「資源類型」資料表的條件索引鍵欄。

注意

資源條件索引鍵會列在資源類型資料表中。您可以在「動作」資料表的資源類型 (*必填) 欄中找到適用於動作的資源類型連結。「資源類型」資料表中的資源類型包括條件索引鍵欄,其中包含套用至「動作」資料表中動作的資源條件索引鍵。

如需下表各欄的詳細資訊,請參閱動作資料表

動作 描述 存取層級 資源類型 (*必填項目) 條件索引鍵 相依動作
AssociateRoleToGroup 准許將角色與群組建立關聯。角色的權限必須允許 Greengrass 核心 Lambda 函數和連接器在其他服務中執行動作 AWS 寫入

group*

AssociateServiceRoleToAccount 授予將角色與帳戶建立關聯的權限。 AWS IoT 中心使用此角色來存取您的 Lambda 函數和 IoT 資源 AWS 許可管理
CreateConnectorDefinition 准許建立連接器定義 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateConnectorDefinitionVersion 准許建立現有連接器定義的一個版本 寫入

connectorDefinition*

CreateCoreDefinition 准許建立核心定義 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateCoreDefinitionVersion 准許建立現有核心定義的一個版本。每一個 Greengrass 群組只能包含一個 Greengrass 核心 寫入

coreDefinition*

CreateDeployment 准許建立部署 寫入

group*

CreateDeviceDefinition 准許建立裝置定義 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateDeviceDefinitionVersion 准許建立現有裝置定義的一個版本 寫入

deviceDefinition*

CreateFunctionDefinition 准許建立要用於群組中的 Lambda 函數定義,而此群組包 Lambda 函數及其組態的清單 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateFunctionDefinitionVersion 准許建立現有 Lambda 函數定義的一個版本 寫入

functionDefinition*

CreateGroup 准許建立群組 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateGroupCertificateAuthority 准許建立群組的 CA,或輪換現有的 CA 寫入

group*

CreateGroupVersion 准許建立已定義的群組的一個版本 寫入

group*

CreateLoggerDefinition 准許建立記錄器定義 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateLoggerDefinitionVersion 准許建立現有記錄器定義的一個版本 寫入

loggerDefinition*

CreateResourceDefinition 准許建立資源定義,其中包含要用於群組中的資源清單 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateResourceDefinitionVersion 准許建立現有資源定義的一個版本 寫入

resourceDefinition*

CreateSoftwareUpdateJob 授予建立 AWS IoT 工作的權限,以觸發 Greengrass 核心以更新正在執行的軟體 寫入
CreateSubscriptionDefinition 准許建立訂閱定義 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateSubscriptionDefinitionVersion 准許建立現有訂閱定義的一個版本 寫入

subscriptionDefinition*

DeleteConnectorDefinition 准許刪除連接器定義 寫入

connectorDefinition*

DeleteCoreDefinition 准許刪除核心定義。刪除部署目前使用的定義會影響未來的部署 寫入

coreDefinition*

DeleteDeviceDefinition 准許刪除裝置定義。刪除部署目前使用的定義會影響未來的部署 寫入

deviceDefinition*

DeleteFunctionDefinition 准許刪除 Lambda 函數定義。刪除部署目前使用的定義會影響未來的部署 寫入

functionDefinition*

DeleteGroup 准許刪除部署目前未使用的群組 寫入

group*

DeleteLoggerDefinition 准許刪除記錄器定義。刪除部署目前使用的定義會影響未來的部署 寫入

loggerDefinition*

DeleteResourceDefinition 准許刪除資源定義 寫入

resourceDefinition*

DeleteSubscriptionDefinition 准許刪除訂閱定義。刪除部署目前使用的定義會影響未來的部署 寫入

subscriptionDefinition*

DisassociateRoleFromGroup 准許取消角色與群組的關聯 寫入

group*

DisassociateServiceRoleFromAccount 准許取消服務角色與帳戶的關聯。如果沒有服務角色,部署不會運作 寫入
Discover 准許擷取連線至 Greengrass 核心的所需資訊 讀取

thing*

GetAssociatedRole 准許擷取與群組相關聯的角色 讀取

group*

GetBulkDeploymentStatus 准許傳回大量部署的狀態 讀取

bulkDeployment*

GetConnectivityInfo 准許擷取核心的連線資訊 讀取

connectivityInfo*

GetConnectorDefinition 准許擷取連接器定義的相關資訊 讀取

connectorDefinition*

GetConnectorDefinitionVersion 准許擷取連接器定義版本的相關資訊 讀取

connectorDefinition*

connectorDefinitionVersion*

GetCoreDefinition 准許擷取核心定義的相關資訊 讀取

coreDefinition*

GetCoreDefinitionVersion 准許擷取核心定義版本的相關資訊 讀取

coreDefinition*

coreDefinitionVersion*

GetDeploymentStatus 准許傳回部署的狀態 讀取

deployment*

group*

GetDeviceDefinition 准許擷取裝置定義的相關資訊 讀取

deviceDefinition*

GetDeviceDefinitionVersion 准許擷取裝置定義版本的相關資訊 讀取

deviceDefinition*

deviceDefinitionVersion*

GetFunctionDefinition 准許擷取 Lambda 函數定義的相關資訊,例如建立時間和最新版本 讀取

functionDefinition*

GetFunctionDefinitionVersion 准許擷取 Lambda 函數定義版本的相關資訊,例如此版本包含哪些 Lambda 函數及其組態 讀取

functionDefinition*

functionDefinitionVersion*

GetGroup 准許擷取群組的相關資訊 讀取

group*

GetGroupCertificateAuthority 准許傳回群組相關聯 CA 的公有金鑰 讀取

certificateAuthority*

group*

GetGroupCertificateConfiguration 准許擷取群組使用的 CA 的目前組態 讀取

group*

GetGroupVersion 准許擷取群組版本的相關資訊 讀取

group*

groupVersion*

GetLoggerDefinition 准許擷取記錄器定義的相關資訊 讀取

loggerDefinition*

GetLoggerDefinitionVersion 准許擷取記錄器定義版本的相關資訊 讀取

loggerDefinition*

loggerDefinitionVersion*

GetResourceDefinition 准許擷取資源定義的相關資訊,例如建立時間和最新版本 讀取

resourceDefinition*

GetResourceDefinitionVersion 准許擷取資源定義版本的相關資訊,例如此版本包含哪些資源 讀取

resourceDefinition*

resourceDefinitionVersion*

GetServiceRoleForAccount 准許擷取連接到帳戶的服務角色 讀取
GetSubscriptionDefinition 准許擷取訂閱定義的相關資訊 讀取

subscriptionDefinition*

GetSubscriptionDefinitionVersion 准許擷取訂閱定義版本的相關資訊 讀取

subscriptionDefinition*

subscriptionDefinitionVersion*

GetThingRuntimeConfiguration 准許擷取物件的執行時間組態 讀取

thingRuntimeConfig*

ListBulkDeploymentDetailedReports 准許擷取已在大量部署操作中啟動的部署及其目前部署狀態的分頁清單 讀取

bulkDeployment*

ListBulkDeployments 准許擷取大量部署的清單 列出
ListConnectorDefinitionVersions 准許列出連接器定義的版本 列出

connectorDefinition*

ListConnectorDefinitions 准許擷取連接器定義的清單 列出
ListCoreDefinitionVersions 准許列出核心定義的版本 列出

coreDefinition*

ListCoreDefinitions 准許擷取核心定義的清單 列出
ListDeployments 准許擷取群組的所有部署的清單 列出

group*

ListDeviceDefinitionVersions 准許列出裝置定義的版本 列出

deviceDefinition*

ListDeviceDefinitions 准許擷取裝置定義的清單 列出
ListFunctionDefinitionVersions 准許列出 Lambda 函數定義的版本 列出

functionDefinition*

ListFunctionDefinitions 准許擷取 Lambda 函數定義的清單 列出
ListGroupCertificateAuthorities 准許擷取群組的目前 CA 清單 列出

group*

ListGroupVersions 准許列出群組的版本 列出

group*

ListGroups 准許擷取群組清單 列出
ListLoggerDefinitionVersions 准許列出記錄器定義的版本 列出

loggerDefinition*

ListLoggerDefinitions 准許擷取記錄器定義的清單 列出
ListResourceDefinitionVersions 准許列出資源定義的版本 列出

resourceDefinition*

ListResourceDefinitions 准許擷取資源定義的清單 列出
ListSubscriptionDefinitionVersions 准許列出訂閱定義的版本 列出

subscriptionDefinition*

ListSubscriptionDefinitions 准許擷取訂閱定義的清單 列出
ListTagsForResource 准許列出資源的標籤 讀取

bulkDeployment

connectorDefinition

coreDefinition

deviceDefinition

functionDefinition

group

loggerDefinition

resourceDefinition

subscriptionDefinition

aws:RequestTag/${TagKey}

aws:TagKeys

ResetDeployments 准許重設群組的部署 寫入

group*

StartBulkDeployment 准許在一個操作中部署多個群組 寫入

aws:RequestTag/${TagKey}

aws:TagKeys

StopBulkDeployment 准許停止執行大量部署 寫入

bulkDeployment*

TagResource 准許將 標籤新增至資源 標記

bulkDeployment

connectorDefinition

coreDefinition

deviceDefinition

functionDefinition

group

loggerDefinition

resourceDefinition

subscriptionDefinition

aws:RequestTag/${TagKey}

aws:TagKeys

UntagResource 授予許可來從資源中移除標籤 標記

bulkDeployment

connectorDefinition

coreDefinition

deviceDefinition

functionDefinition

group

loggerDefinition

resourceDefinition

subscriptionDefinition

aws:TagKeys

UpdateConnectivityInfo 准許更新 Greengrass 核心的連線資訊。任何裝置只要屬於具有此核心的群組,將會收到此資訊,以尋找核心的位置並連接到核心 寫入

connectivityInfo*

UpdateConnectorDefinition 准許更新連接器定義 寫入

connectorDefinition*

UpdateCoreDefinition 准許更新核心定義 寫入

coreDefinition*

UpdateDeviceDefinition 准許更新裝置定義 寫入

deviceDefinition*

UpdateFunctionDefinition 准許更新 Lambda 函數定義 寫入

functionDefinition*

UpdateGroup 准許更新群組 寫入

group*

UpdateGroupCertificateConfiguration 准許更新群組的憑證到期時間 寫入

group*

UpdateLoggerDefinition 准許更新記錄器定義 寫入

loggerDefinition*

UpdateResourceDefinition 准許更新資源定義 寫入

resourceDefinition*

UpdateSubscriptionDefinition 准許更新訂閱定義 寫入

subscriptionDefinition*

UpdateThingRuntimeConfiguration 准許更新物件的執行時間組態 寫入

thingRuntimeConfig*

AWS IoT Greengrass 定義的資源類型

此服務會定義下列資源類型,並可用在 IAM 許可政策陳述式的 Resource 元素中。動作資料表中的每個動作都會指明可使用該動作指定的資源類型。資源類型也能定義您可以在政策中包含哪些條件索引鍵。這些索引鍵都會顯示在「資源類型」資料表的最後一欄。如需下表各欄的詳細資訊,請參閱資源類型資料表

資源類型 ARN 條件索引鍵
connectivityInfo arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/things/${ThingName}/connectivityInfo
certificateAuthority arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/groups/${GroupId}/certificateauthorities/${CertificateAuthorityId}
deployment arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/groups/${GroupId}/deployments/${DeploymentId}
bulkDeployment arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/bulk/deployments/${BulkDeploymentId}

aws:ResourceTag/${TagKey}

group arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/groups/${GroupId}

aws:ResourceTag/${TagKey}

groupVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/groups/${GroupId}/versions/${VersionId}
coreDefinition arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/cores/${CoreDefinitionId}

aws:ResourceTag/${TagKey}

coreDefinitionVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/cores/${CoreDefinitionId}/versions/${VersionId}
deviceDefinition arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/devices/${DeviceDefinitionId}

aws:ResourceTag/${TagKey}

deviceDefinitionVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/devices/${DeviceDefinitionId}/versions/${VersionId}
functionDefinition arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/functions/${FunctionDefinitionId}

aws:ResourceTag/${TagKey}

functionDefinitionVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/functions/${FunctionDefinitionId}/versions/${VersionId}
subscriptionDefinition arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/subscriptions/${SubscriptionDefinitionId}

aws:ResourceTag/${TagKey}

subscriptionDefinitionVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/subscriptions/${SubscriptionDefinitionId}/versions/${VersionId}
loggerDefinition arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/loggers/${LoggerDefinitionId}

aws:ResourceTag/${TagKey}

loggerDefinitionVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/loggers/${LoggerDefinitionId}/versions/${VersionId}
resourceDefinition arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/resources/${ResourceDefinitionId}

aws:ResourceTag/${TagKey}

resourceDefinitionVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/resources/${ResourceDefinitionId}/versions/${VersionId}
connectorDefinition arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/connectors/${ConnectorDefinitionId}

aws:ResourceTag/${TagKey}

connectorDefinitionVersion arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/definition/connectors/${ConnectorDefinitionId}/versions/${VersionId}
thing arn:${Partition}:iot:${Region}:${Account}:thing/${ThingName}
thingRuntimeConfig arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/things/${ThingName}/runtimeconfig

AWS IoT Greengrass 的條件索引鍵

AWS IoT Greengrass 會定義下列可在 IAM 政策Condition元素中使用的條件金鑰。您可以使用這些索引鍵來縮小套用政策陳述式的條件。如需下表各欄的詳細資訊,請參閱條件索引鍵資料表

若要檢視所有服務都可使用的全域條件索引鍵,請參閱可用全域條件索引鍵

條件索引鍵 描述 Type
aws:RequestTag/${TagKey} 依每個必要標籤的允許值集來篩選存取權 字串
aws:ResourceTag/${TagKey} 依與資源相關聯的標籤值篩選存取權 字串
aws:TagKeys 依請求中是否存在強制性標籤來篩選存取 ArrayOfString