AWSEC2SecurityGroupRuleRequest

Objective-C

@interface AWSEC2SecurityGroupRuleRequest

Swift

class AWSEC2SecurityGroupRuleRequest

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.

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

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable cidrIpv4;

    Swift

    var cidrIpv4: String? { get set }
  • The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable cidrIpv6;

    Swift

    var cidrIpv6: String? { get set }
  • The description of the security group rule.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable detail;

    Swift

    var detail: String? { get set }
  • 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.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber *_Nullable fromPort;

    Swift

    var fromPort: NSNumber? { get set }
  • The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

    Use -1 to specify all protocols.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable ipProtocol;

    Swift

    var ipProtocol: String? { get set }
  • The ID of the prefix list.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable prefixListId;

    Swift

    var prefixListId: String? { get set }
  • The ID of the security group that is referenced in the security group rule.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable referencedGroupId;

    Swift

    var referencedGroupId: String? { get set }
  • 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.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber *_Nullable toPort;

    Swift

    var toPort: NSNumber? { get set }