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

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

AWSConfigRemediation-DeleteUnusedSecurityGroup

描述

The AWSConfigRemediation-DeleteUnusedSecurityGroup Automation document deletes the security group you specify in the GroupId parameter. If you attempt to delete a security group that is associated with an Amazon Elastic Compute Cloud (Amazon EC2) instance, or is referenced by another security group, the automation fails. This automation does not delete a default security group.

运行此 Automation(控制台)

文档类型

Automation

所有者

Amazon

平台

Linux、macOS、Windows

参数

  • AutomationAssumeRole

    类型:字符串

    说明:(必需)允许 Systems Manager Automation 代表您执行操作的 AWS Identity and Access Management (IAM) 角色的 Amazon 资源名称 (ARN)。

  • GroupId

    类型: 字符串

    描述:(Required) The ID of the security group that you want to delete.

所需的 IAM 权限

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

  • ssm:ExecuteAutomation

  • ssm:GetAutomationExecution

  • ec2:DescribeSecurityGroups

  • ec2:DeleteSecurityGroup

文档步骤

  • aws:executeAwsApi - Returns the security group name using the value you provide in the GroupId parameter.

  • aws:branch - Confirms that the group name is not "default".

  • aws:executeAwsApi - Deletes the security group specified in the GroupId parameter.

  • aws:executeScript - Confirms the security group was deleted.