SCP::SecurityGroup::SecurityGroupRule

SCP::SecurityGroup::SecurityGroupRule

SCP::SecurityGroup::SecurityGroupRule

Description

A Security Group Rule that allows or denies traffic to and from a server. The rule applies to a direction, protocol, and port range, and can be applied to an IP range, a remote security group, or an address group.

Version

1.1.0

Syntax

To declare this entity in your Infrastructure Builder template, use the following syntax:

JSON

{
  "Type" : "SCP::SecurityGroup::SecurityGroupRule",
  "Properties" : {
    "SecurityGroupId" : "String",
    "Direction" : "String",
    "Ethertype" : "String",
    "Protocol" : "String",
    "PortRangeMin" : "Integer",
    "PortRangeMax" : "Integer",
    "RemoteIpPrefix" : "String",
    "RemoteGroupId" : "String",
    "RemoteAddressGroupId" : "String",
    "Description" : "String"
  }
}

YAML

Type: SCP::SecurityGroup::SecurityGroupRule
Properties:
  SecurityGroupId: String
  Direction: String
  Ethertype: String
  Protocol: String
  PortRangeMin: Integer
  PortRangeMax: Integer
  RemoteIpPrefix: String
  RemoteGroupId: String
  RemoteAddressGroupId: String
  Description: String

Properties

SecurityGroupId

The identifier of the security group that the resource belongs to.

AttributeValue
RequiredYes
TypeString
Update requiresReplacement

Direction

The direction of the traffic the rule applies to.

AttributeValue
RequiredYes
TypeString
Allowed valuesingress | egress
Update requiresReplacement

Ethertype

The Ethernet protocol type the rule applies to.

AttributeValue
RequiredYes
TypeString
Allowed valuesIPv4
Update requiresReplacement

Protocol

The network protocol the rule applies to.

AttributeValue
RequiredNo
TypeString
Update requiresReplacement

PortRangeMin

The minimum port number of the rule’s port range.

AttributeValue
RequiredNo
TypeInteger
Update requiresReplacement

PortRangeMax

The maximum port number of the rule’s port range.

AttributeValue
RequiredNo
TypeInteger
Update requiresReplacement

RemoteIpPrefix

The remote IP address range the rule applies to in CIDR notation.

AttributeValue
RequiredNo
TypeString
Update requiresReplacement

RemoteGroupId

The identifier of the remote security group the rule applies to.

AttributeValue
RequiredNo
TypeString
Update requiresReplacement

RemoteAddressGroupId

The identifier of the remote address group the rule applies to.

AttributeValue
RequiredNo
TypeString
Update requiresReplacement

Description

A brief explanation or note about this security group rule.

AttributeValue
RequiredNo
TypeString
Length constraintsMax: 255
Update requiresReplacement

Return Values

Ref

When you pass the logical ID of this resource to the Ref function, Ref returns the value of the Id.

Fn::GetAtt

AttributeDescription
SecurityGroupIdThe identifier of the security group that the resource belongs to.
DirectionThe direction of the traffic the rule applies to.
EthertypeThe Ethernet protocol type the rule applies to.
ProtocolThe network protocol the rule applies to.
PortRangeMinThe minimum port number of the rule’s port range.
PortRangeMaxThe maximum port number of the rule’s port range.
RemoteIpPrefixThe remote IP address range the rule applies to in CIDR notation.
RemoteGroupIdThe identifier of the remote security group the rule applies to.
RemoteAddressGroupIdThe identifier of the remote address group the rule applies to.
DescriptionA brief explanation or note about this security group rule.
RemoteGroupNameThe name of the remote security group the rule applies to.
RemoteAddressGroupNameThe name of the remote address group the rule applies to.