AWS::SecGroup type

Declarative primitive for referencing AWS Security Group resources. Supported anchor items: Name, VpcId (can be Vpc resource), Description (required for creation), Tags, GroupId Supported properties: Tags, CidrBlock (assert only).

Direct parent types

AWS Resource definition
Direct subtypes: 14


create(rd:AWS::SecGroup, **props:Hash)internal Source: autoload/AWS.ngs:574
Declarative primitive for creating AWS Security Group resources
find(rd:AWS::SecGroup) Source: autoload/AWS.ngs:525
Declarative primitive for finding AWS Security Group resources
init(rd:AWS::SecGroup, anchor:Arr)deprecated Source: autoload/AWS.ngs:496
Initialize SecGroup from Arr of [name, vpc_id].
init(rd:AWS::SecGroup, Name:Str, VpcId:Any) Source: autoload/AWS.ngs:503
Initialize SecGroup from security group name and vpc.


AWS::SecGroup("https-server", AWS::Vpc(...))
users_ids(r:AWS::SecGroup) Source: autoload/AWS.ngs:516
Declarative primitive to convert AWS Security Group to array of hashes with GroupId and UserId keys. Looks like it's badly named. Candidate for renaming. Additional plan is to eliminate the need for this method.


Arr of Hash. Each Hash has: GroupId, UserId


sg = AwsSecGroup(...) # servers behing ELB
# Allow traffic from ELB to the servers
sg.converge(..., IpPermissions = [{UserIdGroupPairs = elb_sg.users_ids(), ...}])
# In future, should be:
sg.converge(..., IpPermissions = [{UserIdGroupPairs = elb_sg, ...}])