def exec_module(self, **kwargs):
    for key in self.module_arg_spec:
        setattr(self, key, kwargs[key])
    self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, base_url=self._cloud_environment.endpoints.resource_manager)
    if ((self.resource_group is not None) and (self.service_name is not None) and (self.api_id is not None) and (self.format is not None) and (self.export is not None)):
        self.results['api_export'] = self.format_item(self.get())
    return self.results
def exec_module(self, **kwargs):
    for key in self.module_arg_spec:
        setattr(self, key, kwargs[key])
    self.mgmt_client = self.get_mgmt_svc_client(GenericRestClient, base_url=self._cloud_environment.endpoints.resource_manager)
    if ((self.resource_group is not None) and (self.service_name is not None) and (self.api_id is not None) and (self.format is not None) and (self.export is not None)):
        self.results['api_export'] = self.format_item(self.get())
    return self.results