View a markdown version of this page

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

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

AWS CodeDeploy (服務字首:codedeploy) 提供下列服務特定的操作、資源、動作和條件索引鍵,可用於 IAM 許可政策。

參考資料:

AWS CodeDeploy 定義的 API 操作

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

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

AddTagsToOnPremisesInstances

codedeploy:AddTagsToOnPremisesInstances

標記、寫入

BatchGetApplicationRevisions

codedeploy:BatchGetApplicationRevisions

讀取

BatchGetApplications

codedeploy:BatchGetApplications

讀取

BatchGetDeploymentGroups

codedeploy:BatchGetDeploymentGroups

讀取

BatchGetDeploymentInstances

codedeploy:BatchGetDeploymentInstances

讀取

BatchGetDeploymentTargets

codedeploy:BatchGetDeploymentTargets

讀取

BatchGetDeployments

codedeploy:BatchGetDeployments

讀取

BatchGetOnPremisesInstances

codedeploy:BatchGetOnPremisesInstances

讀取

ContinueDeployment

codedeploy:ContinueDeployment

寫入

codedeploy:CreateCloudFormationDeployment

寫入

CreateApplication

codedeploy:CreateApplication

寫入

codedeploy:TagResource

標記、寫入

CreateDeployment

codedeploy:CreateDeployment

寫入

codedeploy:GetApplicationRevision

清單

codedeploy:GetDeploymentConfig

清單

codedeploy:RegisterApplicationRevision

寫入

codedeploy:UpdateDeploymentGroup

寫入

CreateDeploymentConfig

codedeploy:CreateDeploymentConfig

寫入

CreateDeploymentGroup

codedeploy:CreateDeploymentGroup

寫入

codedeploy:TagResource

標記、寫入

iam:PassRole

iam:PassedToService

codedeploy.amazonaws.com

寫入

DeleteApplication

程式碼部署:DeleteApplication

寫入

DeleteDeploymentConfig

codedeploy:DeleteDeploymentConfig

寫入

DeleteDeploymentGroup

codedeploy:DeleteDeploymentGroup

寫入

DeleteGitHubAccountToken

codedeploy:DeleteGitHubAccountToken

寫入

DeleteResourcesByExternalId

codedeploy:DeleteResourcesByExternalId

寫入

DeregisterOnPremisesInstance

codedeploy:DeregisterOnPremisesInstance

寫入

GetApplication

codedeploy:GetApplication

清單

GetApplicationRevision

codedeploy:GetApplicationRevision

清單

GetDeployment

codedeploy:GetDeployment

清單

GetDeploymentConfig

codedeploy:GetDeploymentConfig

清單

GetDeploymentGroup

codedeploy:GetDeploymentGroup

清單

GetDeploymentInstance

codedeploy:GetDeploymentInstance

清單

GetDeploymentTarget

codedeploy:GetDeploymentTarget

讀取

GetOnPremisesInstance

codedeploy:GetOnPremisesInstance

清單

ListApplicationRevisions

codedeploy:ListApplicationRevisions

清單

ListApplications

codedeploy:ListApplications

清單

ListDeploymentConfigs

codedeploy:ListDeploymentConfigs

清單

ListDeploymentGroups

codedeploy:ListDeploymentGroups

清單

ListDeploymentInstances

codedeploy:ListDeploymentInstances

清單

ListDeploymentTargets

codedeploy:ListDeploymentTargets

清單

ListDeployments

codedeploy:ListDeployments

清單

ListGitHubAccountTokenNames

codedeploy:ListGitHubAccountTokenNames

清單

ListOnPremisesInstances

codedeploy:ListOnPremisesInstances

清單

ListTagsForResource

codedeploy:ListTagsForResource

清單

PutLifecycleEventHookExecutionStatus

codedeploy:CreateCloudFormationDeployment

寫入

codedeploy:PutLifecycleEventHookExecutionStatus

寫入

RegisterApplicationRevision

codedeploy:RegisterApplicationRevision

寫入

RegisterOnPremisesInstance

codedeploy:RegisterOnPremisesInstance

寫入

RemoveTagsFromOnPremisesInstances

程式碼部署:RemoveTagsFromOnPremisesInstances

標記、寫入

SkipWaitTimeForInstanceTermination

codedeploy:CreateCloudFormationDeployment

寫入

codedeploy:SkipWaitTimeForInstanceTermination

寫入

StopDeployment

codedeploy:CreateCloudFormationDeployment

寫入

codedeploy:StopDeployment

寫入

TagResource

codedeploy:TagResource

標記、寫入

UntagResource

codedeploy:UntagResource

標記、寫入

UpdateApplication

codedeploy:UpdateApplication

寫入

UpdateDeploymentGroup

codedeploy:UpdateDeploymentGroup

寫入

iam:PassRole

iam:PassedToService

codedeploy.amazonaws.com

寫入

AWS CodeDeploy 定義的動作

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

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

AddTagsToOnPremisesInstances

准許將標籤新增至一個或多個現場部署執行個體

執行個體*

標記、寫入

BatchGetApplicationRevisions

准許取得有關一個或多個應用程式修訂的資訊

應用程式*

aws:ResourceTag/${TagKey}

讀取

BatchGetApplications

准許取得與 IAM 使用者相關聯的多個應用程式的相關資訊。

應用程式*

aws:ResourceTag/${TagKey}

讀取

BatchGetDeploymentGroups

准許取得一或多個部署群組的相關資訊

部署群組*

aws:ResourceTag/${TagKey}

讀取

BatchGetDeploymentInstances

准許取得一個或多個執行個體 (其屬於部署群組一部分) 的相關資訊

部署群組*

aws:ResourceTag/${TagKey}

讀取

BatchGetDeploymentTargets

准許傳回與部署相關聯的一或多個目標的陣列。此方法適用於所有運算類型,應該採用以取代已棄用的 BatchGetDeploymentInstances。可傳回的目標數目上限為 25

讀取

BatchGetDeployments

准許取得與 IAM 使用者相關聯的多個部署的相關資訊。

部署群組*

aws:ResourceTag/${TagKey}

讀取

BatchGetOnPremisesInstances

准許取得一或多個現場部署執行個體的相關資訊。

執行個體*

讀取

ContinueDeployment

准許立即開始將流量從原始環境中的執行個體,重新路由傳送到替代環境,而不等待一段指定的時間

寫入

CreateApplication

准許建立與 IAM 使用者關聯的應用程式

應用程式*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

寫入

CreateDeployment

准許針對與 IAM 使用者相關聯的應用程式,建立部署群組

部署群組*

aws:ResourceTag/${TagKey}

寫入

CreateDeploymentConfig

准許建立與 IAM 使用者相關聯的自訂部署組態

deploymentconfig*

寫入

CreateDeploymentGroup

准許針對與 IAM 使用者相關聯的應用程式,建立部署群組

部署群組*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

寫入

DeleteApplication

准許刪除與 IAM 使用者關聯的應用程式

應用程式*

aws:ResourceTag/${TagKey}

寫入

DeleteDeploymentConfig

准許刪除與 IAM 使用者相關聯的自訂部署組態

deploymentconfig*

寫入

DeleteDeploymentGroup

准許針對與 IAM 使用者相關聯的應用程式,刪除部署群組

部署群組*

aws:ResourceTag/${TagKey}

寫入

DeleteGitHubAccountToken

准許刪除 GitHub 帳戶連線

寫入

DeleteResourcesByExternalId

准許刪除與指定外部 ID 相關聯的資源

寫入

DeregisterOnPremisesInstance

准許取消註冊現場部署執行個體

執行個體*

寫入

GetApplication

准許取得與 IAM 使用者相關聯的單一應用程式的相關資訊

應用程式*

aws:ResourceTag/${TagKey}

清單

GetApplicationRevision

准許針對與 IAM 使用者相關聯的應用程式,取得單一應用程式修訂的相關資訊

應用程式*

aws:ResourceTag/${TagKey}

清單

GetDeployment

准許針對與 IAM 使用者相關聯的應用程式,取得部署群組的單一部署的相關資訊

部署群組*

aws:ResourceTag/${TagKey}

清單

GetDeploymentConfig

准許取得與 IAM 使用者相關聯的單一部署組態的相關資訊

deploymentconfig*

清單

GetDeploymentGroup

准許針對與 IAM 使用者相關聯的應用程式,取得單一部署群組的相關資訊

部署群組*

aws:ResourceTag/${TagKey}

清單

GetDeploymentInstance

准許針對與 IAM 使用者相關聯的部署,取得其中單一執行個體的相關資訊

部署群組*

aws:ResourceTag/${TagKey}

清單

GetDeploymentTarget

准許傳回部署目標的相關資訊

讀取

GetOnPremisesInstance

准許取得單一內部部署執行個體的相關資訊

執行個體*

清單

ListApplicationRevisions

准許針對與 IAM 使用者相關聯的應用程式,取得所有應用程式修訂的相關資訊

應用程式*

aws:ResourceTag/${TagKey}

清單

ListApplications

准許取得與 IAM 使用者相關聯的所有應用程式的相關資訊

清單

ListDeploymentConfigs

准許取得與 IAM 使用者相關聯的所有部署組態的相關資訊

清單

ListDeploymentGroups

准許針對與 IAM 使用者相關聯的應用程式,取得所有部署群組的相關資訊

應用程式*

aws:ResourceTag/${TagKey}

清單

ListDeploymentInstances

准許針對與 IAM 使用者相關聯的部署,取得其中所有執行個體的相關資訊

部署群組*

aws:ResourceTag/${TagKey}

清單

ListDeploymentTargets

准許傳回與部署相關聯的目標 ID 陣列

清單

ListDeployments

准許針對與 IAM 使用者相關聯的部署群組,取得所有部署的相關資訊,或取得與 IAM 使用者相關聯的所有部署

部署群組*

aws:ResourceTag/${TagKey}

清單

ListGitHubAccountTokenNames

准許列出 GitHub 帳戶預存連線的名稱

清單

ListOnPremisesInstances

准許取得一或多個現場部署執行個體名稱的清單

清單

ListTagsForResource

准許傳回由特定 ARN 所識別的資源的標籤清單 標籤用來組織和分類 CodeDeploy 資源

應用程式

aws:ResourceTag/${TagKey}

清單

部署群組

aws:ResourceTag/${TagKey}

PutLifecycleEventHookExecutionStatus

准許針對 IAM 使用者相關聯的部署,公告生命週期事件關聯執行狀態

寫入

RegisterApplicationRevision

准許針對與 IAM 使用者相關聯的應用程式,註冊應用程式修訂的相關資訊

應用程式*

aws:ResourceTag/${TagKey}

寫入

RegisterOnPremisesInstance

准許註冊內部部署執行個體

執行個體*

寫入

RemoveTagsFromOnPremisesInstances

准許從一個或多個現場部署執行個體移除標籤

執行個體*

標記、寫入

SkipWaitTimeForInstanceTermination

准許覆寫任何指定的等待時間,並在流量路由完成後立即開始終止執行個體 此動作僅適用於藍/綠部署

寫入

StopDeployment

准許停止部署

寫入

TagResource

准許將 Tags 輸入參數中的標籤清單與 ResourceArn 輸入參數所識別的資源建立關聯

應用程式

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

標記、寫入

部署群組

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

UntagResource

准許將一組標籤與指定資源取消關聯 由 ResourceArn 輸入參數所識別的資源。標籤由 TagKeys 輸入參數中的金鑰清單所識別

應用程式

aws:ResourceTag/${TagKey}

aws:TagKeys

標記、寫入

部署群組

aws:ResourceTag/${TagKey}

aws:TagKeys

UpdateApplication

准許更新應用程式

應用程式*

aws:ResourceTag/${TagKey}

寫入

UpdateDeploymentGroup

准許針對與 IAM 使用者相關聯的應用程式,變更單一部署群組的相關資訊

部署群組*

aws:ResourceTag/${TagKey}

寫入

AWS CodeDeploy 的僅限許可動作

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

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

CreateCloudFormationDeployment

准許建立 CloudFormation 部署以配合 CloudFormation 堆疊更新的作業流程

寫入

AWS CodeDeploy 定義的資源類型

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

資源類型 ARN 條件索引鍵

應用程式

arn:${Partition}:codedeploy:${Region}:${Account}:application:${ApplicationName}

aws:ResourceTag/${TagKey}

deploymentconfig

arn:${Partition}:codedeploy:${Region}:${Account}:deploymentconfig:${DeploymentConfigurationName}

部署群組

arn:${Partition}:codedeploy:${Region}:${Account}:deploymentgroup:${ApplicationName}/${DeploymentGroupName}

aws:ResourceTag/${TagKey}

執行個體

arn:${Partition}:codedeploy:${Region}:${Account}:instance:${InstanceName}

AWS CodeDeploy 的條件索引鍵

AWS CodeDeploy 定義下列條件索引鍵,可用於 IAM 政策的 Condition元素。

條件索引鍵 描述 Type

aws:RequestTag/${TagKey}

根據請求中的標籤鍵值組是否存在來篩選動作

String

aws:ResourceTag/${TagKey}

根據連接到資源的標籤鍵值組來篩選動作

String

aws:TagKeys

根據請求中的標籤鍵是否存在來篩選動作

ArrayOfString