本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
列出資源
在您執行 aws cloudformation create-stack
命令之後,您可以使用 aws cloudformation list-stack-resources
命令列出其資源。此命令會列出您使用 --stack-name
參數指定之堆疊中每個資源的摘要。報告包含堆疊的摘要,其中包含建立或刪除狀態。
以下範例顯示 myteststack
堆疊的資源:
$
aws cloudformation list-stack-resources --stack-name myteststack{ "StackResourceSummaries": [ { "ResourceStatus": "CREATE_COMPLETE", "ResourceType": "AWS::S3::Bucket", "ResourceStatusReason": null, "LastUpdatedTimestamp": "2013-08-23T01:02:28.025Z", "PhysicalResourceId": "myteststack-s3bucket-sample", "LogicalResourceId": "S3Bucket" } ] }
AWS CloudFormation 報告任何運行或刪除的堆棧的資源詳細信息。如果您指定狀態為的堆疊名稱CREATE_IN_PROCESS
,則僅 AWS CloudFormation 報告狀態為的資源CREATE_COMPLETE
。
注意
aws cloudformation describe-stack-resources
命令會傳回於 90 天內刪除之堆疊的資訊。