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

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

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

AWS App Runner (服務字首:apprunner) 提供下列服務特有的資源、動作和條件內容索引鍵,可用於 IAM 許可政策。

參考資料:

AWS App Runner 定義的動作

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

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

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

注意

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

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

動作 描述 存取層級 資源類型 (*必填項目) 條件索引鍵 相依動作
AssociateCustomDomain 准許將您自己的網域名稱與 App Runner 服務的 AWS App Runner 子網域 URL 建立關聯 寫入

service*

AssociateWebAcl [僅限許可] 准許將服務與 AWS WAF Web ACL 關聯 寫入

service*

webacl*

CreateAutoScalingConfiguration 准許建立 AWS App Runner 自動擴展組態資源 寫入

autoscalingconfiguration*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateConnection 准許建立 AWS App Runner 連線資源 寫入

connection*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateObservabilityConfiguration 准許建立 AWS App Runner 可觀察性組態資源 寫入

observabilityconfiguration*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateService 准許建立 AWS App Runner 服務資源 寫入

service*

autoscalingconfiguration

connection

observabilityconfiguration

vpcconnector

aws:RequestTag/${TagKey}

aws:TagKeys

apprunner:ConnectionArn

apprunner:AutoScalingConfigurationArn

apprunner:ObservabilityConfigurationArn

apprunner:VpcConnectorArn

CreateVpcConnector 准許建立 AWS App Runner VPC 連接器資源 寫入

vpcconnector*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateVpcIngressConnection 准許建立 AWS App Runner VpcIngressConnection 資源 寫入

vpcingressconnection*

aws:RequestTag/${TagKey}

aws:TagKeys

apprunner:ServiceArn

apprunner:VpcId

apprunner:VpcEndpointId

DeleteAutoScalingConfiguration 准許刪除 AWS App Runner 自動擴展組態資源 寫入

autoscalingconfiguration*

DeleteConnection 准許刪除 AWS App Runner 連線資源 寫入

connection*

DeleteObservabilityConfiguration 准許刪除 AWS App Runner 可觀察性組態資源 寫入

observabilityconfiguration*

DeleteService 准許刪除 AWS App Runner 服務資源 寫入

service*

DeleteVpcConnector 准許刪除 AWS App Runner VPC 連接器資源 寫入

vpcconnector*

DeleteVpcIngressConnection 准許刪除 AWS App Runner VpcIngressConnection 資源 寫入

vpcingressconnection*

DescribeAutoScalingConfiguration 准許擷取 AWS App Runner 自動擴展組態資源的描述 讀取

autoscalingconfiguration*

DescribeCustomDomains 准許擷取與 AWS App Runner 服務關聯的自訂網域名稱描述 讀取

service*

DescribeObservabilityConfiguration 准許擷取 AWS App Runner 可觀察性組態資源的描述 讀取

observabilityconfiguration*

DescribeOperation 准許擷取 AWS App Runner 服務上發生的操作描述 讀取

service*

DescribeService 准許擷取 AWS App Runner 服務資源的描述 讀取

service*

DescribeVpcConnector 准許擷取 AWS App Runner VPC 連接器資源的描述 讀取

vpcconnector*

DescribeVpcIngressConnection 准許擷取 AWS App Runner VpcIngressConnection 資源的描述 讀取

vpcingressconnection*

DescribeWebAclForService [僅限許可] 准許取得與 AWS App Runner 服務關聯的 AWS WAF Web ACL 讀取

service*

DisassociateCustomDomain 准許解除自訂網域名稱與 AWS App Runner 服務的關聯 寫入

service*

DisassociateWebAcl [僅限許可] 准許取消服務與 AWS WAF Web ACL 的關聯 寫入

service*

ListAssociatedServicesForWebAcl [僅限許可] 准許列出與 AWS WAF Web ACL 關聯的服務 列出

webacl*

ListAutoScalingConfigurations 准許擷取您 AWS 帳戶 中 AWS App Runner 自動擴展組態的清單 列出
ListConnections 准許擷取您的 AWS 帳戶中的 AWS App Runner 連線清單 列出
ListObservabilityConfigurations 准許擷取您 AWS 帳戶 中 AWS App Runner 可觀察性組態資源的清單 列出
ListOperations 准許擷取 AWS App Runner 資源中發生的操作清單 列出

service*

ListServices 准許擷取您 AWS 帳戶 中正在執行 AWS App Runner 服務的清單 列出
ListServicesForAutoScalingConfiguration 准許擷取您 AWS 帳戶 中 AWS App Runner 自動擴展組態的相關聯 AppRunner 服務的清單 列出

autoscalingconfiguration*

ListTagsForResource 准許列出與 AWS App Runner 資源相關聯的標籤 讀取

autoscalingconfiguration

connection

observabilityconfiguration

service

vpcconnector

ListVpcConnectors 准許擷取您的 AWS 帳戶中的 AWS App Runner VPC 連接器清單 列出
ListVpcIngressConnections 准許擷取您的 AWS 帳戶 中的 AWS App Runner VpcIngressConnection 清單 列出
PauseService 准許暫停作用中的 AWS App Runner 服務 寫入

service*

ResumeService 准許恢復作用中的 AWS App Runner 服務 寫入

service*

StartDeployment 准許起始手動部署至 AWS App Runner 服務 寫入

service*

TagResource 准許將標籤新增至 AWS App Runner 資源或更新其標籤值 標記

autoscalingconfiguration

connection

observabilityconfiguration

service

vpcconnector

vpcingressconnection

aws:TagKeys

aws:RequestTag/${TagKey}

UntagResource 准許從 AWS App Runner 資源移除標籤 標記

autoscalingconfiguration

connection

observabilityconfiguration

service

vpcconnector

vpcingressconnection

aws:TagKeys

UpdateDefaultAutoScalingConfiguration 准許將 AWS App Runner 自動擴展組態更新為您 AWS 帳戶 中的預設值 寫入

autoscalingconfiguration*

UpdateService 准許更新 AWS App Runner 服務資源 寫入

service*

autoscalingconfiguration

connection

observabilityconfiguration

vpcconnector

apprunner:ConnectionArn

apprunner:AutoScalingConfigurationArn

apprunner:ObservabilityConfigurationArn

apprunner:VpcConnectorArn

UpdateVpcIngressConnection 准許更新 AWS App Runner VpcIngressConnection 資源 寫入

vpcingressconnection*

apprunner:VpcId

apprunner:VpcEndpointId

AWS App Runner 定義的資源類型

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

資源類型 ARN 條件索引鍵
service arn:${Partition}:apprunner:${Region}:${Account}:service/${ServiceName}/${ServiceId}

aws:ResourceTag/${TagKey}

connection arn:${Partition}:apprunner:${Region}:${Account}:connection/${ConnectionName}/${ConnectionId}

aws:ResourceTag/${TagKey}

autoscalingconfiguration arn:${Partition}:apprunner:${Region}:${Account}:autoscalingconfiguration/${AutoscalingConfigurationName}/${AutoscalingConfigurationVersion}/${AutoscalingConfigurationId}

aws:ResourceTag/${TagKey}

observabilityconfiguration arn:${Partition}:apprunner:${Region}:${Account}:observabilityconfiguration/${ObservabilityConfigurationName}/${ObservabilityConfigurationVersion}/${ObservabilityConfigurationId}

aws:ResourceTag/${TagKey}

vpcconnector arn:${Partition}:apprunner:${Region}:${Account}:vpcconnector/${VpcConnectorName}/${VpcConnectorVersion}/${VpcConnectorId}

aws:ResourceTag/${TagKey}

vpcingressconnection arn:${Partition}:apprunner:${Region}:${Account}:vpcingressconnection/${VpcIngressConnectionName}/${VpcIngressConnectionId}

aws:ResourceTag/${TagKey}

webacl arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}

AWS App Runner 的條件索引鍵

AWS App Runner 定義了下列條件索引鍵,可用於 IAM 政策的 Condition 元素。您可以使用這些索引鍵來縮小套用政策陳述式的條件。如需下表各欄的詳細資訊,請參閱條件索引鍵表

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

條件索引鍵 描述 類型
apprunner:AutoScalingConfigurationArn 根據相關聯 AutoScalingConfiguration 資源的 ARN,依 CreateService 和 UpdateService 動作篩選存取權 ARN
apprunner:ConnectionArn 根據相關聯 Connection 資源的 ARN,依 CreateService 和 UpdateService 動作篩選存取權 ARN
apprunner:ObservabilityConfigurationArn 根據相關聯 ObservabilityConfiguration 資源的 ARN,依 CreateService 和 UpdateService 動作篩選存取權 ARN
apprunner:ServiceArn 根據相關聯 Service 資源的 ARN,依 CreateVpcIngressConnection 動作篩選存取權 ARN
apprunner:VpcConnectorArn 根據相關聯 VpcConnector 資源的 ARN,依 CreateService 和 UpdateService 動作篩選存取權 ARN
apprunner:VpcEndpointId 根據請求中的 VPC 端點,依 CreateVpcIngressConnection 和 UpdateVpcIngressConnection 動作篩選存取權 字串
apprunner:VpcId 根據請求中的 VPC,依 CreateVpcIngressConnection 和 UpdateVpcIngressConnection 動作篩選存取權 字串
aws:RequestTag/${TagKey} 根據請求中的標籤鍵值對是否存在,依動作篩選存取權 字串
aws:ResourceTag/${TagKey} 根據連線到資源的標籤鍵值對,依動作篩選存取權 字串
aws:TagKeys 根據請求中的標籤索引鍵是否存在,依動作篩選存取權 ArrayOfString