def create_security_group(self): security_group_name = input('please enter sg name:') request = CreateSecurityGroupRequest() request.set_accept_format('json') request.set_SecurityGroupName(security_group_name) request.set_VpcId(self.vpcid) response = self.client.do_action_with_exception(request) response_dict = json.loads(response) return response_dict['SecurityGroupId']
def createSecurityGroup(): request = CreateSecurityGroupRequest() request.set_accept_format('json') response = client.do_action_with_exception(request) response = json.loads(str(response, encoding='utf-8')) return response