amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.Types.SecurityGroupRuleRequest

Description

 
Synopsis

Documentation

data SecurityGroupRuleRequest Source #

Describes a security group rule.

You must specify exactly one of the following parameters, based on the rule type:

  • CidrIpv4
  • CidrIpv6
  • PrefixListId
  • ReferencedGroupId

When you modify a rule, you cannot change the rule type. For example, if the rule uses an IPv4 address range, you must use CidrIpv4 to specify a new IPv4 address range.

See: newSecurityGroupRuleRequest smart constructor.

Constructors

SecurityGroupRuleRequest' 

Fields

  • cidrIpv4 :: Maybe Text

    The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length.

  • cidrIpv6 :: Maybe Text

    The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.

  • description :: Maybe Text

    The description of the security group rule.

  • fromPort :: Maybe Int

    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

  • ipProtocol :: Maybe Text

    The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

    Use -1 to specify all protocols.

  • prefixListId :: Maybe Text

    The ID of the prefix list.

  • referencedGroupId :: Maybe Text

    The ID of the security group that is referenced in the security group rule.

  • toPort :: Maybe 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. If you specify all ICMP/ICMPv6 types, you must specify all codes.

Instances

Instances details
ToQuery SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

Generic SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

Associated Types

type Rep SecurityGroupRuleRequest :: Type -> Type #

Read SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

Show SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

NFData SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

Eq SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

Hashable SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

type Rep SecurityGroupRuleRequest Source # 
Instance details

Defined in Amazonka.EC2.Types.SecurityGroupRuleRequest

type Rep SecurityGroupRuleRequest = D1 ('MetaData "SecurityGroupRuleRequest" "Amazonka.EC2.Types.SecurityGroupRuleRequest" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "SecurityGroupRuleRequest'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "cidrIpv4") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "cidrIpv6") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "fromPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))) :*: ((S1 ('MetaSel ('Just "ipProtocol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "prefixListId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "referencedGroupId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "toPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))))

newSecurityGroupRuleRequest :: SecurityGroupRuleRequest Source #

Create a value of SecurityGroupRuleRequest with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:cidrIpv4:SecurityGroupRuleRequest', securityGroupRuleRequest_cidrIpv4 - The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length.

$sel:cidrIpv6:SecurityGroupRuleRequest', securityGroupRuleRequest_cidrIpv6 - The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.

$sel:description:SecurityGroupRuleRequest', securityGroupRuleRequest_description - The description of the security group rule.

$sel:fromPort:SecurityGroupRuleRequest', securityGroupRuleRequest_fromPort - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

$sel:ipProtocol:SecurityGroupRuleRequest', securityGroupRuleRequest_ipProtocol - The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

Use -1 to specify all protocols.

$sel:prefixListId:SecurityGroupRuleRequest', securityGroupRuleRequest_prefixListId - The ID of the prefix list.

$sel:referencedGroupId:SecurityGroupRuleRequest', securityGroupRuleRequest_referencedGroupId - The ID of the security group that is referenced in the security group rule.

$sel:toPort:SecurityGroupRuleRequest', securityGroupRuleRequest_toPort - 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. If you specify all ICMP/ICMPv6 types, you must specify all codes.

securityGroupRuleRequest_cidrIpv4 :: Lens' SecurityGroupRuleRequest (Maybe Text) Source #

The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length.

securityGroupRuleRequest_cidrIpv6 :: Lens' SecurityGroupRuleRequest (Maybe Text) Source #

The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.

securityGroupRuleRequest_description :: Lens' SecurityGroupRuleRequest (Maybe Text) Source #

The description of the security group rule.

securityGroupRuleRequest_fromPort :: Lens' SecurityGroupRuleRequest (Maybe Int) Source #

The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

securityGroupRuleRequest_ipProtocol :: Lens' SecurityGroupRuleRequest (Maybe Text) Source #

The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

Use -1 to specify all protocols.

securityGroupRuleRequest_referencedGroupId :: Lens' SecurityGroupRuleRequest (Maybe Text) Source #

The ID of the security group that is referenced in the security group rule.

securityGroupRuleRequest_toPort :: Lens' SecurityGroupRuleRequest (Maybe Int) Source #

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. If you specify all ICMP/ICMPv6 types, you must specify all codes.