AWS Native is in preview. AWS Classic is fully supported.
aws-native.ec2.SecurityGroupIngress
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource Type definition for AWS::EC2::SecurityGroupIngress
Create SecurityGroupIngress Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityGroupIngress(name: string, args: SecurityGroupIngressArgs, opts?: CustomResourceOptions);
@overload
def SecurityGroupIngress(resource_name: str,
args: SecurityGroupIngressInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityGroupIngress(resource_name: str,
opts: Optional[ResourceOptions] = None,
ip_protocol: Optional[str] = None,
cidr_ip: Optional[str] = None,
cidr_ipv6: Optional[str] = None,
description: Optional[str] = None,
from_port: Optional[int] = None,
group_id: Optional[str] = None,
group_name: Optional[str] = None,
source_prefix_list_id: Optional[str] = None,
source_security_group_id: Optional[str] = None,
source_security_group_name: Optional[str] = None,
source_security_group_owner_id: Optional[str] = None,
to_port: Optional[int] = None)
func NewSecurityGroupIngress(ctx *Context, name string, args SecurityGroupIngressArgs, opts ...ResourceOption) (*SecurityGroupIngress, error)
public SecurityGroupIngress(string name, SecurityGroupIngressArgs args, CustomResourceOptions? opts = null)
public SecurityGroupIngress(String name, SecurityGroupIngressArgs args)
public SecurityGroupIngress(String name, SecurityGroupIngressArgs args, CustomResourceOptions options)
type: aws-native:ec2:SecurityGroupIngress
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecurityGroupIngressArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecurityGroupIngressInitArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecurityGroupIngressArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityGroupIngressArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityGroupIngressArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SecurityGroupIngress Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SecurityGroupIngress resource accepts the following input properties:
- Ip
Protocol string The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).
[VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
- Cidr
Ip string - The IPv4 ranges
- Cidr
Ipv6 string - [VPC only] The IPv6 ranges
- Description string
- Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously
- From
Port int The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- Group
Id string The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- Group
Name string - The name of the security group.
- Source
Prefix stringList Id - [EC2-VPC only] The ID of a prefix list.
- Source
Security stringGroup Id - The ID of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID.
- Source
Security stringGroup Name [EC2-Classic, default VPC] The name of the source security group.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- Source
Security stringGroup Owner Id [nondefault VPC] The AWS account ID that owns the source security group. You can't specify this property with an IP address range.
If you specify SourceSecurityGroupName or SourceSecurityGroupId and that security group is owned by a different account than the account creating the stack, you must specify the SourceSecurityGroupOwnerId; otherwise, this property is optional.
- To
Port int The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- Ip
Protocol string The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).
[VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
- Cidr
Ip string - The IPv4 ranges
- Cidr
Ipv6 string - [VPC only] The IPv6 ranges
- Description string
- Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously
- From
Port int The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- Group
Id string The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- Group
Name string - The name of the security group.
- Source
Prefix stringList Id - [EC2-VPC only] The ID of a prefix list.
- Source
Security stringGroup Id - The ID of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID.
- Source
Security stringGroup Name [EC2-Classic, default VPC] The name of the source security group.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- Source
Security stringGroup Owner Id [nondefault VPC] The AWS account ID that owns the source security group. You can't specify this property with an IP address range.
If you specify SourceSecurityGroupName or SourceSecurityGroupId and that security group is owned by a different account than the account creating the stack, you must specify the SourceSecurityGroupOwnerId; otherwise, this property is optional.
- To
Port int The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- ip
Protocol String The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).
[VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
- cidr
Ip String - The IPv4 ranges
- cidr
Ipv6 String - [VPC only] The IPv6 ranges
- description String
- Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously
- from
Port Integer The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- group
Id String The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- group
Name String - The name of the security group.
- source
Prefix StringList Id - [EC2-VPC only] The ID of a prefix list.
- source
Security StringGroup Id - The ID of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID.
- source
Security StringGroup Name [EC2-Classic, default VPC] The name of the source security group.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- source
Security StringGroup Owner Id [nondefault VPC] The AWS account ID that owns the source security group. You can't specify this property with an IP address range.
If you specify SourceSecurityGroupName or SourceSecurityGroupId and that security group is owned by a different account than the account creating the stack, you must specify the SourceSecurityGroupOwnerId; otherwise, this property is optional.
- to
Port Integer The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- ip
Protocol string The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).
[VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
- cidr
Ip string - The IPv4 ranges
- cidr
Ipv6 string - [VPC only] The IPv6 ranges
- description string
- Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously
- from
Port number The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- group
Id string The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- group
Name string - The name of the security group.
- source
Prefix stringList Id - [EC2-VPC only] The ID of a prefix list.
- source
Security stringGroup Id - The ID of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID.
- source
Security stringGroup Name [EC2-Classic, default VPC] The name of the source security group.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- source
Security stringGroup Owner Id [nondefault VPC] The AWS account ID that owns the source security group. You can't specify this property with an IP address range.
If you specify SourceSecurityGroupName or SourceSecurityGroupId and that security group is owned by a different account than the account creating the stack, you must specify the SourceSecurityGroupOwnerId; otherwise, this property is optional.
- to
Port number The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- ip_
protocol str The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).
[VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
- cidr_
ip str - The IPv4 ranges
- cidr_
ipv6 str - [VPC only] The IPv6 ranges
- description str
- Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously
- from_
port int The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- group_
id str The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- group_
name str - The name of the security group.
- source_
prefix_ strlist_ id - [EC2-VPC only] The ID of a prefix list.
- source_
security_ strgroup_ id - The ID of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID.
- source_
security_ strgroup_ name [EC2-Classic, default VPC] The name of the source security group.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- source_
security_ strgroup_ owner_ id [nondefault VPC] The AWS account ID that owns the source security group. You can't specify this property with an IP address range.
If you specify SourceSecurityGroupName or SourceSecurityGroupId and that security group is owned by a different account than the account creating the stack, you must specify the SourceSecurityGroupOwnerId; otherwise, this property is optional.
- to_
port int The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- ip
Protocol String The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).
[VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.
- cidr
Ip String - The IPv4 ranges
- cidr
Ipv6 String - [VPC only] The IPv6 ranges
- description String
- Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously
- from
Port Number The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
- group
Id String The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- group
Name String - The name of the security group.
- source
Prefix StringList Id - [EC2-VPC only] The ID of a prefix list.
- source
Security StringGroup Id - The ID of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID.
- source
Security StringGroup Name [EC2-Classic, default VPC] The name of the source security group.
You must specify the GroupName property or the GroupId property. For security groups that are in a VPC, you must use the GroupId property.
- source
Security StringGroup Owner Id [nondefault VPC] The AWS account ID that owns the source security group. You can't specify this property with an IP address range.
If you specify SourceSecurityGroupName or SourceSecurityGroupId and that security group is owned by a different account than the account creating the stack, you must specify the SourceSecurityGroupOwnerId; otherwise, this property is optional.
- to
Port Number The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. If you specify all ICMP/ICMPv6 types, you must specify all codes.
Use this for ICMP and any protocol that uses ports.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityGroupIngress resource produces the following output properties:
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.