AWSSupport-ListEC2Resources - AWS Systems Manager
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

AWSSupport-ListEC2Resources

描述

The AWSSupport-ListEC2Resources Automation document returns information about Amazon EC2 instances and related resources like Amazon Elastic Block Store (Amazon EBS) volumes, Elastic IP addresses, and Amazon EC2 Auto Scaling groups from the AWS Regions you specify. By default, the information is gathered from all Regions and is displayed in the output of the automation. Optionally, you can specify an Amazon Simple Storage Service (Amazon S3) bucket for the information to be uploaded to as a comma-separated values (.csv) file.

运行此 Automation(控制台)

文档类型

Automation

所有者

Amazon

平台

Linux、macOS、Windows

参数

  • AutomationAssumeRole

    类型:字符串

    说明:(可选)允许 Systems Manager Automation 代表您执行操作的 AWS Identity and Access Management (IAM) 角色的 Amazon 资源名称 (ARN)。如果未指定任何角色,则 Systems Manager Automation 使用运行此文档的用户的权限。

  • 存储桶

    类型: 字符串

    描述:(Optional) The name of the S3 bucket where the information gathered is uploaded to.

  • DisplayResourceDeletionDocumentation

    类型: 字符串

    默认值:True

    描述:(Optional) If set to True, the automation creates links in the output to documentation related to deleting your resources.

  • RegionsToQuery

    类型: 字符串

    默认值:全部

    描述:(Optional) The Regions you want to gather Amazon EC2 related information from.

所需的 IAM 权限

AutomationAssumeRole 需要执行以下操作才能成功运行 Automation 文档。

  • autoscaling:DescribeAutoScalingGroups

  • ec2:DescribeAddresses

  • ec2:DescribeImages

  • ec2:DescribeInstances

  • ec2:DescribeNetworkInterfaces

  • ec2:DescribeRegions

  • ec2:DescribeVolumes

  • ec2:DescribeSnapshots

  • elasticloadbalancing:DescribeLoadBalancers

Additionally, to successfully upload the information gathered to the S3 bucket you specify, the AutomationAssumeRole requires the following actions:

  • s3:GetBucketAcl

  • s3:GetBucketPolicyStatus

  • s3:PutObject

文档步骤

  • aws:executeAwsApi - Gathers the Regions enabled for the account.

  • aws:executeScript - Confirms the Regions enabled for the account support the Regions specified in the RegionsToQuery parameter.

  • aws:branch - If no Regions are enabled for the account, the automation ends.

  • aws:executeScript - Lists all EC2 instances for the account and Regions you specify.

  • aws:executeScript - Lists all Amazon Machine Images (AMI) for the account and Regions you specify.

  • aws:executeScript - Lists all EBS volumes for the account and Regions you specify.

  • aws:executeScript - Lists all Elastic IP addresses for the account and Regions you specify.

  • aws:executeScript - Lists all elastic network interfaces for the account and Regions you specify.

  • aws:executeScript - Lists all Auto Scaling groups for the account and Regions you specify.

  • aws:executeScript - Lists all load balancers for the account and Regions you specify.

  • aws:executeScript - Uploads the information gathered to the S3 bucket specified if you provide a value for the Bucket parameter.