def apigateway_models_backend_delete_method(self, function_id, resource_id, method_type): resource = self.get_resource(function_id, resource_id) method = resource.get_method(method_type) if not method: raise NoIntegrationDefined() return resource.resource_methods.pop(method_type)
def apigateway_models_resource_get_integration(self, method_type): resource_method = self.resource_methods.get(method_type, {}) if 'methodIntegration' not in resource_method: raise NoIntegrationDefined() return resource_method['methodIntegration']
def apigateway_models_resource_get_method(self, method_type): method = self.resource_methods.get(method_type) if not method: raise NoIntegrationDefined() return method