Update a sg to add port from existing sg using boto.authorize -
I am trying to update a security group to add a port to another security group. Ex: But I do find the following error If you have You sg
sg.authorize ( 'sg- 123456) abcdef', 'TCP' 22, 22, "SG 123456 ') file" /usr/local/lib/python2.7/site-packages/boto/ec2/securitygroup.py ", line 187, authorized src_group_owner_id = Src_group.owner_id enter attribute:' str 'Object' does not contain any attribute 'owner id'
authorized The method is the use of the
security group object that you represent the source security group on other
sur Rsha Group object. You see the security group's ID passing through the string.
authorize_security_group method
EC2Conction can also use the object that's why accept a string value for the source protection group: < / p>
ec2.authorize_security_group (group_id = 'SG abcdef', ip_protocol = 'tcp', from_port = 22, to_port = 22, src_security_group_group_id = 'SG -123456', src_security_group_owner_id = '123456789012')
Comments
Post a Comment