AWS ec2 documentation change
Summary
Added PowerShell V5 examples for updating/removing security group rule descriptions
Security assessment
Focuses on security group rule management but does not resolve a specific security issue.
Diff
diff --git a/ec2/latest/devguide/example_ec2_UpdateSecurityGroupRuleDescriptionsIngress_section.md b/ec2/latest/devguide/example_ec2_UpdateSecurityGroupRuleDescriptionsIngress_section.md index 4867d6f33..20368e21d 100644 --- a//ec2/latest/devguide/example_ec2_UpdateSecurityGroupRuleDescriptionsIngress_section.md +++ b//ec2/latest/devguide/example_ec2_UpdateSecurityGroupRuleDescriptionsIngress_section.md @@ -93,0 +94,33 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: Updates the description of an existing ingress (inbound) security group rule.** + + + $existingInboundRule = Get-EC2SecurityGroupRule -SecurityGroupRuleId "sgr-1234567890" + $ruleWithUpdatedDescription = [Amazon.EC2.Model.SecurityGroupRuleDescription]@{ + "SecurityGroupRuleId" = $existingInboundRule.SecurityGroupRuleId + "Description" = "Updated rule description" + } + + Update-EC2SecurityGroupRuleIngressDescription -GroupId $existingInboundRule.GroupId -SecurityGroupRuleDescription $ruleWithUpdatedDescription + + + +**Example 2: Removes the description of an existing ingress (inbound) security group rule (by omitting the parameter in the request).** + + + $existingInboundRule = Get-EC2SecurityGroupRule -SecurityGroupRuleId "sgr-1234567890" + $ruleWithoutDescription = [Amazon.EC2.Model.SecurityGroupRuleDescription]@{ + "SecurityGroupRuleId" = $existingInboundRule.SecurityGroupRuleId + } + + Update-EC2SecurityGroupRuleIngressDescription -GroupId $existingInboundRule.GroupId -SecurityGroupRuleDescription $ruleWithoutDescription + + + + * For API details, see [UpdateSecurityGroupRuleDescriptionsIngress](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +