def _insert_resource(self, collection: discovery.Resource, body: Dict[str, Any]) -> 'GcpResource': logger.info('Creating compute resource:\n%s', self.resource_pretty_format(body)) resp = self._execute(collection.insert(project=self.project, body=body)) return self.GcpResource(body['name'], resp['targetLink'])
def _insert_resource(self, collection: discovery.Resource, body: Dict[str, Any]) -> GcpResource: logger.debug("Creating %s", body) resp = self._execute(collection.insert(project=self.project, body=body)) return self.GcpResource(body['name'], resp['targetLink'])