Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AuthorizeSecurityGroupEgressCommand

[VPC only] Adds the specified outbound (egress) rules to a security group for use with a VPC.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address ranges, or to the instances that are associated with the specified source security groups. When specifying an outbound rule for your security group in a VPC, the IpPermissions must include a destination for the traffic.

You specify a protocol for each rule (for example, TCP). For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.

Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.

For information about VPC security group quotas, see Amazon VPC quotas.

example

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, AuthorizeSecurityGroupEgressCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, AuthorizeSecurityGroupEgressCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const command = new AuthorizeSecurityGroupEgressCommand(input);
const response = await client.send(command);
see

AuthorizeSecurityGroupEgressCommandInput for command's input shape.

see

AuthorizeSecurityGroupEgressCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: AuthorizeSecurityGroupEgressCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions