AWS::EC2::SecurityGroupIngress¶
Resource Type definition for AWS::EC2::SecurityGroupIngress
Generated by cfn-typegen --out cfn_types AWS::EC2::SecurityGroupIngress into cfn_types/ec2.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::EC2 resources."""
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
CONSTRAINTS:dict[str,Any]={
}
ATTRIBUTES:dict[str,Any]={"AWS::EC2::SecurityGroupIngress":["Id"]}
RULES:dict[str,Any]={}
Nested types (3)
These are defined above the properties in the generated module.
class SecurityGroupIngressProps(TypedDict, closed=True):
'Resource Type definition for AWS::EC2::SecurityGroupIngress'
CidrIp: NotRequired[Expr[str]]
'The IPv4 ranges'
CidrIpv6: NotRequired[Expr[str]]
'[VPC only] The IPv6 ranges'
Description: NotRequired[Expr[str]]
'Updates the description of an ingress (inbound) security group rule.'
FromPort: NotRequired[Expr[int]]
'The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.'
GroupId: NotRequired[Expr[str]]
'The ID of the security group.'
GroupName: NotRequired[Expr[str]]
'The name of the security group.'
IpProtocol: Expr[str]
'The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).'
SourcePrefixListId: NotRequired[Expr[str]]
'[EC2-VPC only] The ID of a prefix list.'
SourceSecurityGroupId: NotRequired[Expr[str]]
'The ID of the security group.'
SourceSecurityGroupName: NotRequired[Expr[str]]
'[EC2-Classic, default VPC] The name of the source security group.'
SourceSecurityGroupOwnerId: NotRequired[Expr[str]]
'[nondefault VPC] The AWS account ID that owns the source security group.'
ToPort: NotRequired[Expr[int]]
'The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.'
class SecurityGroupIngress(ResourceAttrs):
'Resource Type definition for AWS::EC2::SecurityGroupIngress'
Type: Literal['AWS::EC2::SecurityGroupIngress']
Properties: SecurityGroupIngressProps
def security_group_ingress(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[SecurityGroupIngressProps],
) -> SecurityGroupIngress:
return build('AWS::EC2::SecurityGroupIngress', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)
Attributes¶
Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.
Id